Image Style Editor

AnkiWeb addon 1593969147

Resizes images by individually setting CSS width and height through a right-click editor menu, preserving quality and supporting Image Occlusion notes.
AI-generated summary; may contain mistakes.

formattingimage-occlusionmobile-compatible

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
55 (πŸ‘ 52 Β· πŸ‘Ž 3)
Updated
2021-12-17
Anki versions
24.04.1~
License
MIT (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

abandoned

  • Last update or commit: 2021-12-17 (1780 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 8 open, 9 closed.
  • Pull requests: 0 open, 3 merged.
  • Median first response: 34 hours (14 answered issues and pull requests).
  • Outside pull requests: 100% of 2 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1424.04.1+2021-12-17
History across monthly snapshots

Loading…

Similar addons

Editor scale images

Enables resizing images by clicking and dragging their lower-right corner in Anki's desktop editor, preserving aspect ratio; double-clicking clears scaling, with a configurable selection border.

formattingobsoletemobile-compatible

5 votes 57% approval πŸ‘ 5 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.49~ Updated 2022-02-11
Anki Image Reshaper

Automatically resizes and aligns images pasted or drag-dropped into Anki's editor using configurable strategies, with deck-specific defaults and toolbar controls.

card-creationformattingappearance

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.66~ Updated 2025-12-28
ImageResizer

Automatically resizes pasted or drag-and-dropped images to configurable dimensions, with shortcut resizing, aspect-ratio options, upscaling control, and transformation quality settings.

card-creationformattingshortcutsfork-or-reupload

155 votes 65% approval πŸ‘ 113 Β· πŸ‘Ž 42 ⭐ 9 Anki 23.10~ Updated 2023-12-03
Image Rescaler

Rescales images in the Anki editor by setting width/height attributes, reversibly, with per-image, field, and card scopes plus optional auto-rescale on paste.

note-managementformatting

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.2~ Updated 2026-08-05
Scale Images archived

Scales images while editing notes by setting a configurable CSS max-height for selected fields, offering individual and bulk scaling via keyboard shortcuts or buttons.

note-managementformattingshortcuts

18 votes 82% approval πŸ‘ 18 Β· πŸ‘Ž 0 ⭐ 6 Anki 25.02~ Updated 2025-03-13

Description

Image Style Editor

This is an addon for resizing image width and height.

How to use

Right click on an image in editor(Add cards, or in card browser), click on 'Image Styles'.

Accepted formats are: 300, 240px, 20em, 60%, auto,--somestring, empty, etc. Plain numbers(eg. 300) are automatically converted to 300px. Values starting with -- (eg. --name) are automatically converted to var(--name). Trailing and leading spaces are removed.

You can set either only the width or the height, leave the other blank, and the image should retain its aspect ratio. If it doesn't, try going into addon config, and change empty_means to auto. If that still does not work, probably something in your note type styling is overwriting what this addon does, and will need to be modified.

*Note: Please be aware that there is a bug that removes backslashes from the field when you resize an image.

Differences from ImageResizer

  • Uses css height and width properties to resize images, so there is no loss of quality.
  • You can modify width and height for each image individually
  • Can't automatically resize images on paste.
  • Can set min-width, max-width, as well as use many other css features.

Image Occlusion Support This addon supports Image Occlusion notes fully. You can choose to apply style changes to all occlusion cards of the same image, or to all image/mask fields of the card. The previous version (<=v2.1) had a critical bug regarding this feature, view github file to see how to apply the fix.

AnkiDroid Users

  • Due to a bug in AnkiDroid, if the note type uses conditional replacement, the note may become blank. Setting hidden-div-for-image-only-field to true before using editing image style should fix the issue.

Github https://github.com/BlueGreenMagick/image-style-editor This is also where you can post issues if you encounter a bug.

Credits

Credits to searene, developer of the addon ImageResizer. Some of the code for gui were reused in this addon. Also to glutanimate(Aristotelis P.) and others who made the addon Image Occlusion Enhanced, which was how I figured this addon would be possible to make. Thanks to AnKing for several feature suggestions.

Updated last at 2020-10.17 v2.6. All past releases and changelogs can be viewed here

README

Image Style Editor

This is an addon mainly for editing image width and height.

How to use

Right click on an image in editor, click on 'Image Styles'.

Accepted formats are: 300, 240px, 20em, 60%, auto,--somestring, empty, etc. Plain numbers(eg. 300) are automatically converted to 300px. Values starting with -- (eg. --name) are automatically converted to var(--name). Trailing and leading spaces are removed.

You can set either only the width or the height, leave the other blank, and the image should retain its aspect ratio. If it doesn't, try going into config, and change empty_means to auto.

Differences from ImageResizer

  • Uses css height and width properties to resize images, so there is no loss of quality.
  • You can modify width and height individually for each image
  • Can't automatically resize images on paste.

Image Occlusion Support

This addon supports Image Occlusion Enhanced fully. The image styles can be edited on created Image Occlusion cards.

  • For mask/original image fields, if both Apply to all notes and Apply to all fields are checked, the styles will be applied to all the images in other notes and other fields as well.
  • Checking only Apply to all notes, the style is applied to images from only that field in all other notes.
  • Apply to all fields apply styles to only images that are in original image, or mask fields.
  • Apply to all notes applies image styles to the same field in all cards. Note: If you have modified any field name or position, or the notetype name on Image Occlusion Enhanced notetype, the addon's configuration needs to be adjusted before using it on Image Occlusion cards.

AnkiDroid Users

  • Due to a bug in AnkiDroid, if the note type uses conditional replacement, the note may become blank. Setting hidden-div-for-image-only-field to true before using editing image style should fix the issue.

Ankiweb

https://ankiweb.net/shared/info/1593969147

Credits

Thanks to searene, developer of the addon ImageResizer'. Some of the code for gui were reused in this addon. Also to glutanimate(Aristotelis P.) and others who made the addon Image Occlusion Enhanced, which was how I figured this addon would be possible to make. Thanks to AnKing for several feature suggestions.