Picture Size Problem

Hi Staff,

I often copy and paste pictures on the card verso. Even if my initial picture is very small, it appears with maximal size on the answer window. It is a little bit annoying, cause I don’t manage to reduce the size.

Hoping u’ll get a solution

Regards,

Valentin B.

you can limit the image size via CSS in your template. Add the following line in the styling box (middle left box), change 200 to whatever pixel limit you prefer.

img {max-height:200px;}

Please see https://docs.ankiweb.net/#/templates/styling?id=image-resizing

I have a question regarding this. Instead of making a new thread, I’ll continue here.

How would I go about setting max-height of an image, only in a certain div?

I like showing the “front” card at the top when showing the “back”, only smaller. I have changed the text to be smaller with inline css, but can’t seem to find a way to make the (possible) image smaller as well… Resulting in a large image from the “front” appearing above the “back” answer.

Thanks

you can use ID in that div and specify it on the CSS declaration.

In the back template:
<div id="back">{{image_field}}</div>

In the styling box:
#back img {max-height:200px}

3 Likes

Thanks! That did the trick :slight_smile: