question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Photoswipe not opening popup when using with Wordpress media files

See original GitHub issue

Hi,

I’m using Photoswipe on a Wordpress site and the images i wish to use it on are taken from the wp-content/uploads folder. When clicking on an image it’s taking me to the default wordpress media file location rather than opening up in the lightbox?

So it’s redirecting me to this link: http://localhost:8888/wp-content/uploads/2017/11/1010x1514.png

When i try using the image you supplied it works? https://farm3.staticflickr.com/2567/5697107145_a4c2eaa0cd_o.jpg


 <div class="gallery">
					   <figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
      <a href="http://localhost:8888/wp-content/uploads/2017/11/1010x1514.png" itemprop="contentUrl" data-size="1024x1024">
          <img class="scene_element scene_element--fadeinright" src="http://via.placeholder.com/555x372" itemprop="thumbnail" alt="Image description" />
      </a>
                                          <figcaption itemprop="caption description">Image caption  1</figcaption>
                                          
    </figure>
						</div>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
arnowelzelcommented, Nov 21, 2017

How do you use PhotoSwipe in WordPress? You need a plugin to integrate PhotoSwipe - which one do you use? Did you try “Lightbox with Photoswipe” yet (https://wordpress.org/plugins/lightbox-photoswipe/)?

0reactions
marcelomgeraiscommented, Sep 25, 2019

hi, thanks a lot!! Using margin is broken the lines of images. So, i use a little padding (2px) to resolve this. tks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popup gallery (Fancybox and Photoswipe) not opening correctly
If I use PhotoSwipe, the content will show up below the portfolio tiles but above the footer, so you need to scroll down...
Read more >
PhotoSwipe conflicting with Wordpress media files
It seems to work fine if the image isn't hosted on Wordpress. I'm using the sample code from the website and the markup...
Read more >
PhotoSwipe: Responsive JavaScript Image Gallery
Open -source JavaScript image gallery and lightbox.
Read more >
Easily Pop Up Images on WordPress! - YouTube
Meet the easiest way to pop up a lightbox for your images and videos!Read the full post: https://elementor.com/v160-image-lightbox/We have ...
Read more >
Salient theme lightbox problems - Premium WordPress Gallery
It would be the best to use another lightbox, that is not included in the theme, such as PhotoSwipe. This theme (otherwise very...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found