# fitMode Not Working with Image

**URL:** <https://forum.wixstudio.com/t/fitmode-not-working-with-image/5204>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [February 17, 2023, 6:01am UTC](https://forum.wixstudio.com/t/fitmode-not-working-with-image/5204 "2023-02-17T06:01:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhopkins](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mhopkins](https://forum.wixstudio.com/u/mhopkins)\
**Post date:** [February 17, 2023, 6:01am UTC](https://forum.wixstudio.com/t/fitmode-not-working-with-image/5204/1 "2023-02-17T06:01:29Z")

</div>

I’ve used the fitMode code on other pages on my website and it’s worked perfectly. For some reason, however, I am unable to get it to work in a repeater for logo images on this page:

![](https://us1.discourse-cdn.com/wix/original/3X/0/f/0f656ca165c6f77a44dc02784ad19f1c9311e63d.png)

[https://www.appli.org/resources](https://www.appli.org/resources)

The code I’m using is:

 ![](https://us1.discourse-cdn.com/wix/original/3X/1/5/15e89081705968efb2689819d55cb50e7aa10f56.png)

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![mhopkins](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mhopkins](https://forum.wixstudio.com/u/mhopkins)\
**Post date:** [February 28, 2023, 11:50pm UTC](https://forum.wixstudio.com/t/fitmode-not-working-with-image/5204/2 "2023-02-28T23:50:34Z")

</div>

I’m bumping this, as I still haven’t found a working solution for this problem.

---

<div class="post-metadata">

**Author:** ![mhopkins](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mhopkins](https://forum.wixstudio.com/u/mhopkins)\
**Post date:** [March 2, 2023, 5:42pm UTC](https://forum.wixstudio.com/t/fitmode-not-working-with-image/5204/3 "2023-03-02T17:42:27Z")

</div>

RESOLVED:

Thanks to some assistance on the Wix Reddit forum, we ended up with the correct solution:

$w . onReady ( **function** () {  
$w ( ‘#repeater1’ ). onItemReady ( ( $item , image ) =\> {  
$item ( “#image31” ). fitMode = “fit” ;  
});  
})
