How do I fix a product media coding issue causing image duplication?

Hi All,

I think ive made a classic rookie mistake.

I have recently launched a site with the refresh theme.

Was having issues with the product variant images and the featured image; the featured image was in carosuel first but page automatically loaded with the first variant and first variant image selected.

I google and found on here a similar issue, it was in the product media coding. I copied and pasted a code edit from here into mine and replaced what was said to. Ive now been informed this was a big no no… due to different themes etc etc. It did fix the variant issue but am now having another issue; feauted product photo is showing twice on the carousel.

basically i want an outcome of working variant images, but the page loads with the featured photo showing first and only showing once in the carosuel instead of duplicating,

note - the product image duplication is only in the media ONCE. the duplicate is not live, eg: if you click it after being on a variant it doesnt do anything. but its really annoyingly taking up prime space in my carousel.

if anyone can help please. i can copy the current product media coding ( i have not touched or edited anything else)

Hi @Punka23,
This is Theodore from PageFly - Shopify Page Builder App.
You can try building with PageFly Page Builder app. We can help solve the problem
I’ll be so happy if my suggestion can help to solve your problem. If you have any further questions, please feel free to tell me.
Best regards,
Theodore | PageFly