The Lab PhotoSwipe Masonry 2.0

PhotoSwipe Masonry 2.0

Explore the brand new PhotoSwipe Masonry 2.0 gallery, based off Dmitry Semenov's PhotoSwipe plugin.

PhotoSwipe Masonry 2.0

PhotoSwipe Masonry 2.0 is an extension of our pre-existing PhotoSwipe Masonry plugin, which builds upon the touch optimised JavaScript popup gallery from Dmitry Semenov found here.

This gallery takes advantage of the built-in gallery features of WordPress. Simply use the WordPress admin to create a standard gallery and insert it in the page.

The gallery is built using PhotoSwipe from Dmitry Semenov along with Masonry to generate the thumbnail grid layout. You can adjust the size of the thumbnails and full-size images in the settings. You may need to rebuild your images using a plugin like Regenerate Thumbnails.


What has changed?

  • Better code structure
  • Lazy loading for large galleries
  • New integrated resize thumbnails function
  • New clean admin panel
  • Settings located in Settings > Photoswipe 2.0


Help! The gallery doesn’t work!

This is usually caused by a Javascript conflict. The easiest way to track down the problem is to remove or disable other scripts. Try the following:

  • Disable other plugins. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
  • Switch to the most recent WordPress base theme to rule out any theme-specific problems.
  • Use a browser debugger to find the error (Chrome is the best). This may help you track down the conflict.
  • ADVANCED! If it’s a theme issue you may have some scripts embedded in your theme that are causing a conflict. To disable these look inside the header.php, footer.php or functions.php files.


Wanna try it? View the demo or download.

We are on Github if you want to know more or contribute!
Dean Oakley

Written by Dean Oakley

Dean founded Thrive Digital in 2006 and has worked in the design and development space ever since. He received 1st Class Honours in a Bachelor of IT and oversees all technical aspects of our projects.

Join the conversation

Love the plugin, but the gallery is rendered above other content, no matter the order in the editor. This wasn’t the case with the previous version.

Dean says:

Hi Perry, Can you post a link to demo the problem? What version are you using?

My site, uses the plugin, v2. The paragraph of text and image below the gallery are first in the editor.

vietnam hair says:

Great content, looking forward to implement all these tips!

Zbyszek says:

Hi, plugin doesn’t see jQuery because I’m loading it in footer and the plugin loads scripts before. What can I do?

Thiago says:

The share button does not appear. Only appears when I press F5 after clicking the thumbnail.

Hi, is there a way to get a smaller distance below the gallery, it seems to be not possible with CSS, or am I wrong?

Peter says:

Love this plugin – it looks great. However, when I go to add a page or a post I’m receiving this error: ‘call_user_func_array() expects parameter 1 to be a valid callback’. I’ve gone through suggested debugging but not found whats causing the problem.

If anyone has a fix for this I’d be grateful if you could let me know.

GeraldP says:

What if I am not using WordPress? How do I use this?

Leave a Reply