• Hello,

    I’m currently using the Lightbox with PhotoSwipe plugin on my WordPress website and I’m encountering an issue. The plugin works perfectly for images in WEBP format but does not seem to activate for images in JPG format.

    Here is the HTML for a WEBP image, which works fine:

    <a  
       data-lbwps-width="4160" 
       data-lbwps-height="6240" 
       data-lbwps-srcsmall="https://mywebsite.com/path/to/image.webp">
      <img decoding="async" 
           src="https://mywebsite.com/path/to/image.webp" 
           alt="" 
           class="aligncenter size-full wp-image-4203">
    </a>
    

    And here is the HTML for a JPG image, which does not activate the lightbox:

    <a >
      <img decoding="async" 
           class="aligncenter size-full wp-image-4224" 
           src="https://mywebsite.com/path/to/image.jpg" 
           alt="">
    </a>
    

    Both images are inserted into posts using the same method. The plugin seems to be adding the necessary data- attributes automatically for the WEBP image but not for the JPG image. I have checked my settings and do not see an option to choose which image formats should be processed by the plugin.

    To troubleshoot the issue, I have deactivated all other plugins and switched to a default WordPress theme, but the problem persists.

    I would appreciate any help or suggestions to troubleshoot this issue. Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lightbox with PhotoSwipe Plugin Only Working with WEBP Images’ is closed to new replies.