• Resolved vectordave

    (@vectordave)


    Hi there, this is a fantastic plugin, but I have a problem getting the Lightbox to function when using single images. I use Elementor + ACF, dynamic galleries work perfect!
    Whenever I put a single image in a post or page, it won’t use the Lightbox. Is there any fix for this?

    Kind regards and thanks in advance, David

    The page I need help with: [log in to see the link]

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

    (@awelzel)

    The provided link ist just “https://testing%20local”, which is not a valid URL. Can you provide an online example to check this problem?

    Another possibility: let the browser display the HTML source of the page with the problem and look for the image element with the non working picture. Maybe there are line breaks between the link element and the image itself. In this case the output filter of the plugin may not recognize the images, because it looks for image elements which directly follow links to images in the code. This issue will be addressed with the next update.

    For example – this works

    <a href="..."><img ... /></a>

    But not this:

    <a href="...">
      <img ... />
    </a>
    Thread Starter vectordave

    (@vectordave)

    Hi Arno, thank you for your quick response, I will create a test example on a subdomein asap. I will put a link here when it’s online. Thanks again!

    David

    Thread Starter vectordave

    (@vectordave)

    Hi again Arno, Here is an example of my issue with single images:

    Example of a page with a single image and gallery.
    https://workspace.hendersonwebdesign.nl/

    Example of a post with a featured image, a single image and a gallery.
    https://workspace.hendersonwebdesign.nl/portfolio/item-1/

    Thanks in advance!

    David

    Plugin Author Arno Welzel

    (@awelzel)

    I see. It is as I expected it – between the link and the image there is a line break and spaces, therefore the plugin does not “see” the image:

    <a href="https://workspace.hendersonwebdesign.nl/wp-content/uploads/2018/11/mountains-2186075_1920.jpg" data-elementor-open-lightbox="default">
    							<img width="1024" height="683" src="https://workspace.hendersonwebdesign.nl/wp-content/uploads/2018/11/mountains-2186075_1920-1024x683.jpg" class="attachment-large size-large" alt="" srcset="https://workspace.hendersonwebdesign.nl/wp-content/uploads/2018/11/mountains-2186075_1920-1024x683.jpg 1024w, https://workspace.hendersonwebdesign.nl/wp-content/uploads/2018/11/mountains-2186075_1920-300x200.jpg 300w, https://workspace.hendersonwebdesign.nl/wp-content/uploads/2018/11/mountains-2186075_1920-768x512.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" />								</a>
    

    I’ll try to fix this with the next update.

    Thread Starter vectordave

    (@vectordave)

    Thanks a lot for looking into this, much appreciated!
    I will keep an eye out for upcoming updates.

    Thanks again,

    David

    Plugin Author Arno Welzel

    (@awelzel)

    Version 1.74 should fix this.

    Thread Starter vectordave

    (@vectordave)

    Arno, you absolute Pro!

    It works beautifully, thank you so much!
    Use the same links to see it in action ??

    David

    Plugin Author Arno Welzel

    (@awelzel)

    Thank you ??

    Just a note about your site: you should never remove the version parameters from scripts or stylesheets – this can cause problems, because browsers may use outdated versions of the scripts or stylesheets.

    Also see this article: https://arnowelzel.de/en/versioning-of-static-resources-in-wordpress

    Thread Starter vectordave

    (@vectordave)

    Hi Arno, it’s me again with another question ??

    I try using the same plugin/lightbox again, this time however with a plugin that provides masonry and justify layouts, it stopped working unfortunatly. It’s propably imposible to make the lightbox function with every 3rd party plugin/page-builder etc, but maybe you can point me in the right direction? This plugin is so beautiful I would like to use it as much as possible.

    Example:
    https://workspace.hendersonwebdesign.nl/portfolio/item-1/

    Cheers, David

    Plugin Author Arno Welzel

    (@awelzel)

    Well – it’s a similar problem. The images are now embedded in DIV elements as well:

    
    <a href="...">
      <div>
        <img />
      </div>
    </a>
    

    I’ll see what I can do. Maybe it is be possible to adjust the regex to deal with this case as well.

    Thread Starter vectordave

    (@vectordave)

    Thanks for looking into it again Arno, I appreciate it a lot.

    David

    Plugin Author Arno Welzel

    (@awelzel)

    Version 1.81 should now also work with this kind of gallery.

    Thread Starter vectordave

    (@vectordave)

    Hi Arno,

    it works now for the galleries, but not for single images anymore.

    Plugin Author Arno Welzel

    (@awelzel)

    This is strange – because on several websites it works fine with single images.

    Examples:

    Mix of galleries and single images

    Another mix of galleries and single images

    One single image

    What PHP version do you use? Maybe there is an issue with preg_replace_callback() which behaves different in PHP 5.6, 7.0, 7.1 and 7.2.

    Edit: Is there any URL to see an example where it does not work?

    • This reply was modified 5 years, 11 months ago by Arno Welzel.
    Thread Starter vectordave

    (@vectordave)

    Hi Arno, I use PHP 7.2. here is is a link to an example:
    https://workspace.hendersonwebdesign.nl/cpt_gallery/item-1/

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Single Image’ is closed to new replies.