AnkiWeb
- Rating
- 99 (π 77 Β· π 22)
- Updated
- 2021-07-19
- Anki versions
- <=2.1.48
- Description language
- en
AnkiWeb addon 1103084694
Deprecated editor tool that lets users resize images by click-and-drag, incorporating max height/width controls, now unnecessary since Anki 2.1.50 supports native resizing.
Open on AnkiWeb GitHub Ask about alternatives
abandoned
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.15 | 2.1.21 | 2020-03-16 |
| 2.1.22 | 2.1.35 | 2020-08-02 |
| 2.1.36 | 2.1.40 | 2020-12-30 |
| 2.1.41 | 2.1.48 | 2021-07-19 |
Loadingβ¦
Allows click-and-drag image resizing in the Anki desktop editor, preserving aspect ratio, with double-click clearing and configurable border; no further development due to built-in Anki 2.1.50+.
Enables right-click resizing of images by setting CSS width and height, with per-image controls plus Image Occlusion and AnkiDroid support.
Automatically resizes and aligns images pasted or drag-dropped into Anki's editor using configurable strategies, toolbar switching, and deck-specific defaults.
Rescales images in Anki's editor by setting img width/height attributes, reversibly, with toolbar and context-menu controls, auto-rescale on paste, exempt fields, and manual dialog.
Resizes card images to a configurable max width and crops fixed top/bottom pixels to hide slide headers or bars during review, non-destructively, with live preview and note-type targeting.
Scales images in Anki note fields during editing by setting their configurable CSS max-height, with shortcuts and buttons for individual or bulk scaling.
Some people want to resize images without going through an external editor. This add-on adds that exact feature.
It seems a lot of users want to still be able to use the maximum image height in card editor add-on. I had to implement its feature in my add-on since both add-ons cannot be used simultaneously.
This feature was voted the most wanted feature by Anki's subreddit community. I currently don't have a job and would have liked to figure out how to make a little bit of money from the (tens of?) thousands of users my add-ons have. I also don't want to limit the access to only people who paid for my add-ons; once I have the money, I expected that every user, with or without money, could have access to them. I explained on my blog why it was actually complex to create.
Maybe I am just wrong on a financiary level and should copy Glutanimate's Patreon. He seems to have far more success than me while some of his very useful add-ons are only accessible to paid users.
In order to be compatible with mobile, the default decision is to ignore image size on mobile. This is done thanks to the default value of the configuration "note-type style". If you know some CSS, feel free to change it if you need it. Default value should work for most people.
No other incompatiblities are currently known.
The add-on has been tested and seems to work with all users now. I should however note that if you are used to manipulating the html of your fields, unexpected results may occur. For example if for some reason you added classes, max-height, max-width... to some of your images.
By default, resizing preserves the height:width ratio. I assume that's the usual way to resize an image and that is what the user wants.
If you want to be able to resize without preserving the aspect ratio, you need to switch preserve ratio while resizing to false.
You can always resize and preserve the acpect ratio by pressing Shift while resizing.
You can also set this value to original. In this case, the image will always have the original ratio.
The main advantage is that this ratio will be preserved even if you add a maximum height or width.
You can tell the add-on to limit the height and/or width in the editor. This way, big images do not take up a lot of space. If you do so, you'll need to click on the images before being able to resize them. You'll then need to click again if you want the maximum to be applied.
Note that the ratio won't be preserved, unless you had set preserve ratio while resizing to original.
By default, an image will never be less than 10 px in height and width. This ensures that you can always resize the image. Otherwise, you could reduce height/width by accident to 0 px and then have the image disappear. You could change this value if you need to have smaller images, but I believe it'll be rare.
draggable border width sets the width of the area on the image border that allows you to resize the image.
This add-on replaces the method Editor.setupWeb. The new method calls the previous method.
If I reach 400 β¬ (100 more than the initial goal) on the kickstarter,
I'll make a pull request to the author of Edit Field During Review (Cloze) so that they can incorporate my feature in their add-on. Done!
Currently, when max-height/width is applied to an image which has been resized, the new size is not proportional to the old one. I don't see any easy way to correct it. Maybe try to figure it out one day.
Once 2.1.21 is publicly available (not in beta) I should use a new hook to feed the javascript to the editor with the hook instead of changing the method setupWeb.
This add-on has been crowdfunded on Kickstarter. Thanks to:
| Key | Value |
|---|---|
| Copyright | Arthur Milchior arthur@milchior.fr |
| Based on | Anki code by Damien Elmes anki@ichi2.net |
| and on | maximum image height in card editor by Simone Gaiarin |
| Incorporating | jquery-ui (under MIT license) |
| License | GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html |
| Source in | https://github.com/Arthur-Milchior/anki-resize-image |
| Addon number | 1103084694 |
| Default css by | AlienFever |