CORVID newbie and fitmode for images

Hello wix community,
wondering if anyone has experienced this same issue with images being cropped.

product images get cut off or cropped automatically. Support suggested to try and use corvid and the fitmode function for the images; however, being a newbie corvid user I cannot get the function to work on the image elements on these pages. I keep getting the
‘fitMode’ does not exist on that ID error and when i use the pre-populated ids the system shows, i do not see any of I need available

any help would be much appreciated…thanks in advance :wink:

Please post your code.

$w.onReady( function () {
// TODO: write your page related code here…
let mode = $w( “#sliderGallery1” ).fitMode; // “fixedWidth”
$w( “#sliderGallery1” ).fitMode = “fixedWidth” ;
});

#sliderGallery1 is an option that pops up on the prepopulated IDs when looking through one to select. I dont know why, but i has trying to pass say product-image-item for all product images to size correctly. THis is where i get the not valid error

.fitMode is for images not for galleries.

@jonatandor35 the #sliderGallery1 was he only valid option to get around the error as there wasnt too many that populated. What I really want to fix is the product image on the product-page.

so, say we are on this page:
https://ninesixinc.wixsite.com/website/product-page/pennywise-it-you-ll-float-too

if i inspect at the image on the page, i see:

If i try to pass any of the div classes, I get an error that fitmode doesnt exist on that id

@ninesixinc Try using a repeater… (opinion)
You can use the fitMode in repeater images…
https://support.wix.com/en/article/wix-editor-about-repeaters
https://support.wix.com/en/article/wix-editor-adding-and-setting-up-repeaters-lists-grids
https://support.wix.com/en/article/about-displaying-database-content-in-a-repeater
https://www.wix.com/corvid/reference/$w/repeater/onitemready