Large images load slowly on 2.1.34

This issue is back for the new 2.1.34 build:

Damn, I was hoping 5.15.1 would address that. Could I trouble you to move about 3 problem cards into a separate deck and export it, sharing it on Google Drive or somewhere like, then message me a link? I’ll try to reproduce it on a Windows machine here.

Here are 2 cards to test out, the picture loads slowly for both of these for me:

[link to test cards 2.apkg removed]

It’s so odd because most cards load even faster than before. But a few here and there idk what the issue is with them. I’m using the “angle” setting these days since that works even better for me than auto. I tried both in the new version and angle is still faster for me.

Thanks for that, I was able to reproduce the problem on a Windows machine. The two images are about about 6500 pixels wide, which is rather large, and my guess is that the latest web toolkit is not handling images that exceed a certain size as well as it could.

Do you have many affected images? If the problem is limited in scope, one option would be to use a bulk resizing program to shrink the images down to a maximum width of about 4000 or lower, which seems to perform a lot better.

1 Like

I probably have a few thousand. But my collection is huge. I use some addon that I have set to make one of the aspect ratio sides as 1080, so the other becomes whatever to match the 1080 I guess.

It doesn’t happen on all of them, just some.

How would I go about using a bulk resizing program to achieve this? Would I go into the collection media folder and select everything? I’m not sure which program to use and what settings to put.

Either that add-on is only changing the size at display time, or isn’t working for the images in your sample, as they’re about 6x wider than 1080. :slight_smile:

I have no experience with the following tool, but it looks like it could do the job - you could specify a maximum size and tell it not to resize images that are already smaller. Please back up your media folder and experiment on a subsection of it - if you end up making unwanted changes you should be able to restore from the backup you created. I recommend you close Anki or temporarily disable the periodic media sync in the preferences until you’re happy with things.

Reverting to an older toolkit version in the next update is an option, but I’d like to get a better feel for how widespread this issue is first - because it sounds like aside from this issue, display of smaller images has actually improved a bit since the previous update.

1 Like

Ya, smaller images are loading faster for sure compared to previous versions. Sorry, I made a mistake, the add-on setting is set to height as 2160 and then “scale to height and keep ratio”. I’ve now changed the height to 1440.

Also after doing a bulk operation to change the image sizing and even clicking force changes in one direction on next sync, the same images on ankidroid are still on the old aspect ratio and size. Although this doesn’t matter much, was just wondering why the changes didn’t take place there.

Obviously, it doesn’t make much sense to go back to the previous toolkit for one user having issues with some images lol.

1 Like

Thanks for elaborating. Perhaps it might make more sense to limit the width instead of the height? If your goal is to get things to fit on screen, you can do that separately in the card template.

Re the changes, please see But if you’ve changed the aspect ratio that will look bad - I’d recommend you keep it fixed so the images are scaled equally in width and height.

What I did was set that tool up that you linked to a maximum size of 2560x1440. So it adjusted the images as needed to get it down to one of those; either down to 2560 or 1440 depending on the bigger number being the height or width for each image. So the aspect ratio didn’t mess up, I think I worded that wrong in the other post.

I’m still confused about the media part though. So my folder on my pc is 5.51gb, while the same folder on my android phone is 5.74gb now. I’ve deleted and added some images since doing these changes, but of course that doesn’t resync the older images which have just changed in size, but not in filename. Do you mean to say that I should copy the collection media folder somewhere else, then delete the original one, then do a sync in the anki program, then exit and add the media folder back and sync again?

Maybe Android is just using a different scale?

You could export the collection to a colpkg, import into a separate profile, and compare the media folders if you wanted to be sure. You shouldn’t need to do anything like copy your entire media folder - adding or removing a single file should be sufficient for any changed files to sync.

It’s not a different scale, check out the resolutions and file sizes of the same picture file:

I’ve deleted a few pictures in my collection over the last few days, at least 30.

If you view that card in AnkiWeb, does it match the desktop resolution? If so, that seems to indicate a syncing bug with AnkiDroid. If the image is the larger size on AnkiWeb, and you see “media sync complete” when syncing, it would indicate a bug in the computer version.

By the way, 2.1.35 is out today, and I’ve had to roll back to an older toolkit version as there was another issue as well. But these changes you made will not have been to waste - your collection should now consume less space, and the toolkit may be updated again in the future.

I don’t understand how to check it in ankiweb because that was just a file that had a simple name so that I could cross check it between the desktop folder and ankidroid folder.

It just seems to me that if a file is the same image without any edits except for a change in file size, that it doesn’t upload it again. Anything new that I’ve done is reflected in the changes between the desktop and android app because this was a couple days ago that I changed the resolution.

It’s fine because the issue only occurred in the desktop app anyway.

You can check on AnkiWeb by moving a card that uses that image into a separate deck, making it easy to review. When the image is shown for review, you could download it to compare. Things like size changes are supposed to sync, so it sounds like you’ve found a bug somewhere.

It doesn’t change it, here’s an example:

The other file, I accidentally got it to change by creating a new card and copy pasting the image from one of the cards with that image to a new card and then it changed that one specific file on ankiweb and that also synced to ankidroid.

Please go into the Preferences>Network screen, click on Media Log, and send me the file in a private message.

Actually, before doing that, please click on Log Out, then sync again, which will force a rescan of all media. If the issue persists after that, please send me the log file.

I sent you a copy paste of the log. Nothing changed on the ankiweb side.