Anyone know an add-on or method to force anki to always resize images to the screen?

I have a premade deck with involving a lot of image-based questions. Unfortunately, a lot of the cards I have to manually go and resize myself to fit my screen which slows down the time it takes for me to get through the cards.

Is there an add-on or something that forces anki to display images to fit within the screen automatically without user input? I have tried the img commands in the styling css code with no luck. I also have the anking note types add on, but that only does it by image height percentage, and that has not worked reliably for me. Any suggestions would be greatly appreciated.

You can add this to the note styling

img {
   Width:100%;
}
1 Like

Thanks for the response! I apologize because I should have added more details in what I tried so far. I have done that before and it works partially which is strange. If I do not maximize my anki window, it will refuse to respect any guidelines I set for image height and width (thought the width typically never causes issues, it is almost always the height). However, if I have it in a smaller window, it respects the rules I set for it perfectly. Any idea why that may be? This is on a Windows 11 Machine using Anki 2.1.65 QT6

That’s weird. I have no idea…

You can always try width:100%!important

I should have gotten back to you sooner, apologies! Unfortunately, it still did not work. Looks like I am out of luck here. Thanks for helping out though!