• Resolved dwboygenius

    (@dwboygenius)


    In my product catalog, there are several similar products that use the same image file. When activating the lightbox, it only shows the first of these images (along with its caption and title), but skips the others. Is there a way to add an ID to make it unique in the gallery, but not have it in a separate gallery? Or do the image names/files need to be unique?

Viewing 1 replies (of 1 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The plugin intentionally uses every individual image only once (based on the URL of the image which also includes the file name of course), because some themes or plugins create <img> elements the same image URL twice to implement “lazy loading”. This was a thing before the attribute loading="lazy" for <img> elements existed and got used by WordPress on a regular basis. However this also caused images to show up twice in the lightbox, so a fix for this was implemented to avoid this situation.

    It also makes little sense to have an image collection in the lightbox which shows images like 1, 2, 1, 3, 2 where people see some images multiple times. As a visitor I would think there is a bug, because I see the same images multiple times.

    Technically it would be possible to add a backend option to disable the check for multiple use of the same image – but I am reluctant to add this, since then more people will ask again why images show up multiple times when this option is active.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.