# Image Occlusion Enhanced + Scaling Images + Scratchpad

**URL:** <https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215>\
**Category:** Add-ons\
**Created:** [August 12, 2020, 5:37pm UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215 "2020-08-12T17:37:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![baldr](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@baldr](https://forums.ankiweb.net/u/baldr)\
**Post date:** [August 12, 2020, 5:37pm UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215/1 "2020-08-12T17:37:38Z")

</div>

Hi,

I use Image Occlusion Enhanced ([https://ankiweb.net/shared/info/1374772155](https://ankiweb.net/shared/info/1374772155)), as well as AnkiMobile for iOS.

My goal is to not scroll for images on mobile. Additionally, I leverage scratchpad when on the iPad, so therefore, the image needs to be scaled to fit the area above the scratchpad.

I have tried the suggested fixes I have seen on the half-a-dozen other similar threads regarding image scaling, but none have worked.

Has anyone successfully been able to scale images on Image Occlusion Enhanced cards on AnkiMobile?

Thanks!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 13, 2020, 8:35am UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215/2 "2020-08-13T08:35:10Z")

</div>

You could try a max height of “50%”, adjusting to suit.

[https://docs.ankiweb.net/#/templates/styling?id=image-resizing](https://docs.ankiweb.net/#/templates/styling?id=image-resizing)

---

<div class="post-metadata">

**Author:** ![baldr](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@baldr](https://forums.ankiweb.net/u/baldr)\
**Post date:** [September 13, 2020, 8:18pm UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215/3 "2020-09-13T20:18:52Z")

</div>

As shared by this post: [Fit image to window/app](https://forums.ankiweb.net/t/fit-image-to-window-app/1592/4), max-height does not work with a percentage for me, only max-width.

Any ideas why? If I could get max-height working with a percentage variable I think that would solve it.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 14, 2020, 12:23pm UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215/4 "2020-09-14T12:23:20Z")

</div>

That may be the document height - what about “50vh” instead?

---

<div class="post-metadata">

**Author:** ![baldr](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@baldr](https://forums.ankiweb.net/u/baldr)\
**Post date:** [September 22, 2020, 12:24am UTC](https://forums.ankiweb.net/t/image-occlusion-enhanced-scaling-images-scratchpad/2215/5 "2020-09-22T00:24:28Z")

</div>

Perfect, that worked! Thank you!! 🙂
