Why does my mobile site display the wrong number of product images?

Hello everyone,

Sorry for my English since it is not my native language.

So on my products I have a lot of variants (different sizes and colors)

When I assign all the pictures to the variants, the amount of pictures is right.

But when I add 1 extra picture through “Media” (so I should have 2 pictures) the mobile version of my site says 2/3 in the slider. I can’t even scroll to the third. (since there is no third picture)

So 1 picture, is attached to al the variants and 1 picture isn’t attached to a single variant (it is just to showcase the difference in color)

See the pictures attached to my question please ^

Hi @Ramon6 ,

Please go to global.js file, on line 549 and change code:

Code:

if (this.slider.classList.contains('product__media-list')) {
      this.totalPages = this.sliderItemsToShow.length - this.slidesPerPage;
    } else {
      this.totalPages = this.sliderItemsToShow.length - this.slidesPerPage + 1;
    }

Hope it helps!

1 Like

yess this worked for me, thanks a lot!

1 Like