Resizing/controling images resolution

hello, how to set the resolution or to be more clear the displayed resolution in anki cards to a desired one, for example when I attach any image it occupy the whole width in my card what ever the original resolution is

meanwhile anking images are optimized and well centerd not occuping the whole width.

Attached an example of my addded image in b&B section and your image from the old anking v11 FA attachments

Hello,

There are a couple of options that I can think of immediately, and I’ll outline those here in the hopes that one (or both) get you where you want to be. :slight_smile:


First, with any image in Anki you can simply manually adjust the size of the image to your preference (I do this routinely):

CleanShot 2025-03-14 at 07.02.22

This has the obvious benefits of being able to adjust any image, to any size, at any time, to your personal preference.


Second, you can exercise some control over the maximum values for image height, and width, by using the AnKing Note Types add-on.

If you don’t already have the add-on I would recommend it, as it does a good handful of things that are very handy. The add-on can be found here (https://ankiweb.net/shared/info/952691989) and if it’s easier the code for installing the add-on is thus: 952691989

From your main Anki screen, you can click on AnKing, then AnKing Note Types here:

Note here that there is a ‘general’ tab, as well as separate tabs for specific note types. You may have to adjust both ‘general’ and/or the individual note type to which your card pertains:


Give those things a try and let me know how you fare. If either (or both) of those work for you then you should be all set. If not, we’ll keep digging until, hopefully, we find a suitable solution and can get you squared away. :slight_smile:

2 Likes

Manual resize is working but Iam adding a big number of pictures at one time using batch edit addon, so it’s noutbsuitable for my case​:sob:

Anking not working, I even tried 10% width with no effect

I’m assuming you want to get the AnKing behavior in a different note type.

Adding this to the styling section of your note type should work (in the Card Types screen):

img {
    max-width: 85%;
}

If you want to limit it to a specific field, you need to find the reference of that field in the front/back templates and change

{{FieldName}}

to something like

<div id="myfield">{{FieldName}}</div>

Then add this to the styling section instead:

#myfield img {
    max-width: 85%;
}
1 Like

It’s the anking note type, actually a note already in anking deck.But I am adding licture to b&b field and eant it to occupy like 75% of the width especially on my IPAD and PC, instead of taking the whole width of the screen.