Dawn Theme, Total count of images on product page is wrong (+2)

I’m a shopify developer.

url: https://allin-israel.co.il

on every product page for example: This table product page on mobile only !

Problem: On mobile, total product images count is incorrect by +2

I also can’t seems to find the file that is using the “slider-counter–total” class that So I could change the total.

What I tried: "main-product.liquid and also product-media-gallery.liquid. but They seems not to react to changes so I guess they are not connected to this page.

How can I fix it? Thank you all!

Hi @uriWebfusion ,

You can follow this way:

  1. Go to Online store > themes > edit code. Find the global.js file and comment line code as show below

  1. Then, ensure that variable {{ media_count }} has not been changed on product-media-gallery.liquid
![view - 2023-10-31T175126.442.png|939x649](upload://bHh83ZE3BuFDkgaGknoiE3Nhq9D.png)

Hope it will be useful for you. @uriWebfusion

1 Like

Thank you! This worked.

Edit - Now the position of image always remains at 1 even though it’s on image number 3

Came across this same issue. The original post is obviously not the answer. My screenshot will show you the correct line to edit for this to work correctly. Pretty wild this has not been addressed yet.

The issue is the script is incorrectly calculating the total amount of slides by +1. Just adjust the line in the screenshot so it reads this.totalPages - 1