Paste Images As WebP
3.44MB. Updated 2023-01-18.
The author has shared 11 other
item(s).
Description
Download
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
Supported Anki versions:
- 2.1.30-2.1.47 (Updated 2021-11-19)
- 2.1.48-2.1.50 (Updated 2022-10-24)
- 2.1.51-2.1.54+ (Updated 2023-01-18)
To download this add-on, please copy and paste the following code into Anki 2.1:
1151815987
If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.
All Anki 2.1.x Add-Ons Contact Author
Reviews

Works very well, so thank you!
ATTENTION: Do not use the bulk convert feature if you use Image Occlusion. All the occlusions will be out of place if you resize the images.
ATTENTION: Do not use the bulk convert feature if you use Image Occlusion. All the occlusions will be out of place if you resize the images.

Great and very useful Add-On, huge thanks to the author!
Suggestion for future feature:
Add an option to automatically rename the WebP file based on content of a card field. Example: Let's say you have a Field called "Translation", which contains a word you're trying to learn ("guitar" for example). You look up a picture of a guitar and copy it to your clipboard. Upon using the Addons shortcut to paste the image, it automatically converts it in a WebP image and also renames the file to ’Translation’.webp, so in this example to ’guitar.webp’.
Suggestion for future feature:
Add an option to automatically rename the WebP file based on content of a card field. Example: Let's say you have a Field called "Translation", which contains a word you're trying to learn ("guitar" for example). You look up a picture of a guitar and copy it to your clipboard. Upon using the Addons shortcut to paste the image, it automatically converts it in a WebP image and also renames the file to ’Translation’.webp, so in this example to ’guitar.webp’.
Comment from author
Thanks for the suggestion. Should be implemented now.

Very useful

Easily the most useful add-on available today!! Works wonderfully.
TO SET IMAGE SIZE TO BIGGER THAN THE ADD-ON'S DEFAULT 800x600: use the config & edit it there
TO SET IMAGE SIZE TO BIGGER THAN THE ADD-ON'S DEFAULT 800x600: use the config & edit it there

Definitely love this! Wanted to do such task for my deck all along but it's too painstaking. Finally ther's an Add-on that can do the trick.

Doesn't work since the last update on Macos. It worked perfectly before.

Excellent !!! Brillant !!! Effective !!!

Essential for people with low storage, mainly in mobile devices

Please add option to preserve aspect ratio and crop to `max_side_size`.
E.g., for image with `1200x600` or `1200x600` and `max_side_size = 1000`, we have `scale_ratio = max_side_size / max(1200, 600) = 1000 / 1200 = 5 / 6`.
I.e. `1200x600 → 1000x500`, `600x1200 → 500x1000`
Right now, if one specify `max_image_height = max_image_width = 1000` and convert `1200x1500` image, one get deformed `1000x1000` result.
E.g., for image with `1200x600` or `1200x600` and `max_side_size = 1000`, we have `scale_ratio = max_side_size / max(1200, 600) = 1000 / 1200 = 5 / 6`.
I.e. `1200x600 → 1000x500`, `600x1200 → 500x1000`
Right now, if one specify `max_image_height = max_image_width = 1000` and convert `1200x1500` image, one get deformed `1000x1000` result.
Comment from author
The current version (4/18/2022) allows you to set one of the sides to 0. If it's not enough, please report any ideas in our chat.

Thanks!

Not so ideal as AVIF
https://jakearchibald.com/2020/avif-has-landed/
https://jakearchibald.com/2020/avif-has-landed/

Great idea, and very handy!
I'm wondering if its normal though, that all images become blurry if i do any kind of resizing when i paste the image? Even if i keep the aspect ratio constant.
I'm wondering if its normal though, that all images become blurry if i do any kind of resizing when i paste the image? Even if i keep the aspect ratio constant.
Comment from author
Thank you for the feedback! If you crank image quality, the blurriness should go away.

its a really good addon, Idk why but for me it can't convert some of the pics
Comment from author
GIF files are not supported by cwebp.

Thanks for this amazing work of yours

Extremely useful add-on, this should be default in the future

Great add on, but as one other commenter has mentioned - why not AVIF if it's the better/more futere-proof format?
Comment from author
Anki and many other programs do not support this format yet. Maybe in the future.

Is there also a solution for gifs? audios?

thumbs up before using: how much % space will this save? i have over 50k images in my deck, several GB.. are transparent images transparent after converting? WebP work with ankidroid? please let me know id love to save space and they will probably load faster too? i want to use this to convert my entire 50k images but dont want any nightmares of messing up my working system
Comment from author
> 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.
> are transparent images transparent after converting?
By default - no, because transparency wastes disk space. But you can disable the blend_alpha option in the config.json file.
>WebP work with ankidroid?
Yes.
depends on your settings, but you can reduce the size by as far as 9 times, though the image quality will suffer.
> are transparent images transparent after converting?
By default - no, because transparency wastes disk space. But you can disable the blend_alpha option in the config.json file.
>WebP work with ankidroid?
Yes.

Great addon! This should really be default in Anki, don't know how much they are paying to maintain the storage, but it would surely help.

Works like a charm & is extremely effective! Love the fact you can completely configure it to your own needs and have the option to be asked for the settings with every insertation or not.. This really optimises the use of images in Anki indeed.
Thanks for introducing me to WebP and for your wonderfull add-on. It would be great if you have the option to determine the name of the image when pasting, so its management would be complete without the need for another add-on to rename the auto-generated file name.
Thanks for introducing me to WebP and for your wonderfull add-on. It would be great if you have the option to determine the name of the image when pasting, so its management would be complete without the need for another add-on to rename the auto-generated file name.

cool

Works perfectly
extremely useful
Thank you very much
extremely useful
Thank you very much

Amazing addon! Thank you so much! Just an idea: It would be really nice if there was a bulk convert option, I don't know if it's possible though. Edit: Thank you so so much!
Comment from author before post was edited
I appreciate your review, and thanks for the amazing idea! It has been implemented in the latest release.

Does this convert already existing images in collection.media? I use the Bulk Fetch Images from Google addon and was wondering if it could auto convert all the images this addon downloads. Great addon!
Comment from author
The add-on deliberately avoids processing internal pastes. Otherwise using Anki would become a nightmare ;)
However, in the latest release it is possible to bulk-convert images. To do it select the cards you want to process and press Edit > Bulk-convert to WebP.
However, in the latest release it is possible to bulk-convert images. To do it select the cards you want to process and press Edit > Bulk-convert to WebP.

Nice plugin, thank you! Just one thing: Would it be possible to add an option for not upscaling images when pasting images lower than the specified sizes automatically, similar to the "ImageResizer" add-on? They could of course still be converted to webp though.
Comment from author
Great idea! It has been added in the latest version.

This is a wonderful idea! Why don't we ask damien to implement it natively?

thanks bro uve saved my harddrive