lightbox

Use (jquery.)photoswipe as lightbox etc. alternative with link fallback

Today I'd like to share a very simple trick which seems a bit underrepresentated in the documentation of jquery.photoswipe (built on Photoswipe): How to simply provide a photoswipe gallery function using the following class based markup:

Drupal 7 Snippet: Add lightbox fallback for image_link_formatter

Little Drupal 7 snippet for the image_link_formatter module (https://www.drupal.org/project/image_link_formatter) to add a fallback to lightbox in size large if no link is given.
Should work the same with other fallbacks (colorbox, etc.).

With some time you could create a clean field formatter from this containing the hard coded values as field display settings.

  1. /**