# Cropping a thin image

**URL:** <https://forum.inductiveautomation.com/t/cropping-a-thin-image/96793>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 3, 2024, 8:19pm UTC](https://forum.inductiveautomation.com/t/cropping-a-thin-image/96793 "2024-10-03T20:19:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deforder](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@deforder](https://forum.inductiveautomation.com/u/deforder)\
**Post date:** [October 3, 2024, 8:19pm UTC](https://forum.inductiveautomation.com/t/cropping-a-thin-image/96793/1 "2024-10-03T20:19:19Z")

</div>

I noticed that if I take an image with fit.mode = "fill" and compress it (by height for example) very much (\<16px), the image disappears and an empty area remains. Is there any way to avoid this?

Perspective, 8.1.42

Thanks in advance!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a2e4bc16aa720f6c08a7eaf3d5ddf3ef629878a7.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b906f7b29d90465c74c1741d6495dc02441eb05d.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 3, 2024, 10:08pm UTC](https://forum.inductiveautomation.com/t/cropping-a-thin-image/96793/2 "2024-10-03T22:08:16Z")

</div>

That's weird. I'm able to confirm.  
 ![Image height fill](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/4/d46fa5d2780149fc80c8fbf5a03280859af4e070.gif)

A possible workaround is to put an expression binding on `fit.mode`, something like,  
`if({this.position.height} < 10, "none", "fill")`

You'll need to check if it suits as fill does both height and width which may cause your image to stretch horizontally.

(Psychrotech is a company name I made up for a presentation. It turns out there is one in UK, I think.)
