Support » Plugin: Lightbox with PhotoSwipe » Same image is show twice in lightbox

  • Resolved onlysli

    (@onlysli)


    Hello, I have a page where there is an image with a link to the image url, after the image i have a text link “click to enlarge” which also points to the image url. When I click on any of this two links (the image link or the text link), the lightbox open with same image twice (the counter shows 2 images and you can go left and right but same image is shown).

    How can i ignore the second link so the lightbox show the image only once?

    Thanks.

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

    (@awelzel)

    Links to images without a visible image as thumbnail can’t be ignored. In fact this is a feature which was requested by some users and got fixed with version 3.0.2.

    If the image itself is already linked, there is no need for a separate link “click to enlarge”. People are used to clicking images to enlarge them and I don’t think that anyone will not try to click an image just because there is no separate text. Also just having a text “click the image to enlarge” without link is helpful as well.

    Hi

    I’ve got the same problem, when using the Advanced Gallery block from the ‘Kadence Blocks – Gutenberg Page Builder Toolkit’ plugin.

    Example here : https://drewk.photo/artworks/sock-gallery-winter-open-2019/

    (Just for clarity – I’m not getting the same problem with other block galleries, or with my own tabular php image arrays)

    • This reply was modified 9 months, 2 weeks ago by muttznutz.
    Plugin Author Arno Welzel

    (@awelzel)

    The gallery creates a useless link under each image:

    <p><a href="https://drewk.photo/artworks/wp-content/uploads/sock_6056-1024x683.jpg" class="kb-gallery-item-link" data-lbwps-width="1024" data-lbwps-height="683"></a>

    I don’t know why Kadence Blocks does this – but it makes no sense at all to have a linked image first and then a second link with no content at all. This will also confuse screenreaders and people who rely on keyboard navigation using the tab-key to jump from one link to the next and should be fixed.

    Thanks for replying so promptly, Arno.
    I’ve switched captions on now for that gallery, and it looks like the empty paragraph is a placeholder for the caption.
    Only the entries without a caption are duplicated in the Lightbox.

    Plugin Author Arno Welzel

    (@awelzel)

    This seems to be a bug in the gallery. An empty caption should not create a separate paragraph with an empty link to the image.

    The HTML code is also not valid:

    https://validator.w3.org/nu/?doc=https%3A%2F%2Fdrewk.photo%2Fartworks%2Fsock-gallery-winter-open-2019%2F

    You should ask the maintainers of Kadence Blocks to fix this.

    Will do, Arno

    Just an update (and for info) – I’ve switched to the CoBlocks plugin, which seems much better behaved.

    (As an aside – those validation errors really p*ssed me off – I’d just spent ages cleaning up my theme 🙁 )

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the feedback.

    By the way: on your site there is a link which you might have forgotten:

    <p><a href="https://drewk.photo/artworks/wp-admin/plugins.php">Installed Plugins</a></p>

    Not sure how that got there 🤦‍♂️ – thanks, Arno 🙂

    Thread Starter onlysli

    (@onlysli)

    @awelzel thanks for quick reply. You are right there is no need for extra “click to enlarge” link, I’ll remove them.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Same image is show twice in lightbox’ is closed to new replies.