I have a deck with TONS of PNG images in it (about 150gb). I want to compress them to help save storage space but need to maintain as high image quality as I can even though l’m compressing.
It doesn’t seem like there is an anki addon that will accomplish my goal. As such, I found this website (compressimage), which seems like it does a good job at compressing images while maintaining good quality.
I’m open to any other recommendations if people have them though.
I was hoping I could just drag and drop my Anki media folder into the above program and it will compress all the images at once. But afterwards how would I get all of these new compressed images to replace the images on my original cards with the same formatting and everything (eg, location of image on the card, line breaks between images, etc.)? Also, what is the best way to keep a backup of my Anki collection with the original images if something goes wrong during this process?
Thanks for your response. How does changing PNG to WebP affect the quality of the image? I like the idea of reducing the storage space like that but I also really need the images to maintain as much quality as possible too, which I know is a difficult balance.
WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index
In settings, you can add this option to try to maintain as much quality as possible while reducing file size
when converting PNGs to WEBP, it makes sense to add -lossless and -q 100 options.
Less quality = More storage space
Worked well. Reduced filesize of the .colpkg by 10% even with it set to 90% quality.
A wonderful add-on, in general saves me around 50-70% of disk space
I love this plugin! Works well both in the editor (while pasting images) and in batch conversion mode to optimize the existing collection.
It helped me reduce the size of images in my media folder from 435 MB to 165 MB without any perceivable difference in quality during reviews
how much % space will this save?
depends on your settings, but you can reduce the size by as far as 9 times, though the image quality will suffer.
Thanks for sharing this add on. It looks promising. Have you used this before? If so, what settings do you recommend? Also, does this add on make the image physically smaller? I don’t necessarily want the image to be physically smaller, rather I just want the file size of each image smaller while still maintaining the same physical size and hopefully maintaining quality that is not significantly different to the human eye.
Let’s say I convert all my images to WebP with that add on, is there a way to convert back to the original higher quality PNG file afterwards? Like what if I’m not happy with the change in quality… is there no going back?
GIF uses old lossless compression, but supports few colors, although animation can be used to increase the number.
PNG uses lossless compression that compresses best the images with flat colors like diagrams and maps.
JPEG uses lossy compression that can compress photos so that when decompressing, the photo can look somewhat like the original, but a diagram would look visibly bad. If you compress a losslessly-compressed image with lossy compression, you can’t get the exact original image back.
WebP can use lossy or lossless compression, but it is relatively new, and some websites and software do not support it.
I think it is impossible to restore an image that has become low quality to high quality. Quality should be adjustable in Config.
Png animations will be static images if you use the webp add-on. (but png animations are rarely included in the deck.)
Webp works best if the image is large and not optimized. If the image is already small converting it to webp may not reduce the total size. (I tried converting a free deck of AnkingV11 to webp before but it didn’t reduce the size as much as I expected because of too many small images).
If you don’t have most of your decks learned yet, you may want to split the deck into several decks and store the decks you don’t want to learn yet on your local device. (sync will be easier)
Webp should display fine on desktop and AnkiMobile and AnkiDroid. AnkiWeb may be browser dependent, it is displayed fine in Chrome on my device.
On my iPad, when I use compressimage(.io) to convert my PNG files to WebP with 90% image quality, I’m blown away with how much file size is reduced and I literally cannot tell the difference in quality. I just tried 5 images as a test and there was 90% size reduction (13.7 MB to 1.4 MB) without altering the physical size of the images. Afterwards, there is no perceptible difference in image quality… it almost seems too good to be true.
Anyways, I’m in no way trying to advertise this resource but it’s the only one I can easily use on my iPad to test WebP out. Now my question is, do you think if I use the add on you suggested and set the WebP conversion to 90% then it will have the same results? I don’t know enough about this stuff but I feel like it technically should. I just can’t test the add on right now since my desktop is getting worked on, so I’m currently limited to my iPad for now.
There are programs to recompress PNG images by trying different methods, in case they were just saved with low compression settings, like AdvanceCOMP and OptiPNG.
There is source code; I don’t know anything about getting Mac OS X binaries.
All of my images are iPad screenshots from clipboard with “Paste clipboard images as PNG” enabled. I’m starting to run out of space on my device with this method so that’s why I’m now trying to compress them, but I really don’t want to alter the overall image quality too much.