Videos

What if you had some videos in the mix? Photonic can handle that too. I have the philosophy that Photonic is meant for photos, not videos, because Photonic’s primary goal is to assist in making photos easily and beautifully presented for photographers using WordPress. In fact most online photo services deprioritize videos with the same philosophy, and some services don’t even have videos! At the time of writing 500px.com doesn’t have videos, and guess what? Native WordPress galleries don’t support videos! That being said, people often use photo services, notably Google Photos, to share personal videos with family, and so, with effect from version 1.66 of Photonic, videos are supported.

The Lightbox Feature Matrix says that most lightboxes support videos.

  1. For videos that are a part of albums / photosets / galleries from Flickr / Picasa / SmugMug / Zenfolio / Instagram you have to do pretty much nothing. Just make sure that your videos are getting pulled. You can do this in two different ways:
    • You can configure the settings: Photonic → Settings → <Photo service><Photo service> Settings → Media to show, where <Photo service> is either Flickr or Picasa or SmugMug or Zenfolio or Instagram.
    • Regardless of the setting above you can pass the media parameter to a shortcode. The media parameter takes 3 values: photos (to show photos only), videos (to show videos only) and all (to show both photos and videos). The following is the typical usage:
      [gallery type='google' user_id='sayontan' album='6354351428035793137' max_results=30 media='all']

      Please refer to the individual demo pages for more examples.

  2. For videos coming from YouTube / Vimeo:
    • Select the option Photonic → Settings → Generic Options → Generic Settings → Photonic Lightbox for non-Photonic videos (YouTube / Vimeo etc.).
    • Create a YouTube / Vimeo link the way you would create a regular link:
      • For YouTube regular links, embed links and short-links are all supported. For Vimeo regular and embed links are supported. So create a link in any of these formats:
        
        	<a href='https://www.youtube.com/watch?v=AAmCedDNGgU'>My YouTube video</a>
        	<a href='https://youtube.com/embed/AAmCedDNGgU'>My YouTube video</a>
        	<a href='https://youtu.be/AAmCedDNGgU'><img src='https://my-cool-domain/placeholder.png'/></a>
        
        	<a href="http://vimeo.com/29193046">Vimeo Test</a>
        	<a href="https://player.vimeo.com/video/29193046">Vimeo Embed</a>
        

        Photonic will automatically associate a lightbox with this.

      • The following shows the behaviour above:
        Exotic delicacy
      • Note that WP’s inbuilt way of simply pasting a YouTube / Vimeo link will still show a video on the site itself. So, simply pasting this line:
        https://www.youtube.com/watch?v=AAmCedDNGgU

        … will result in an embedded video:

        The above is untouched by Photonic.

  3. For videos hosted on your site or elsewhere on the web:
    • Select the option Photonic → Settings → Generic Options → Generic Settings → Photonic Lightbox for non-Photonic videos (YouTube / Vimeo etc.).
    • Create a link to the video the way you would create a regular link:
      <a href='https://photos.smugmug.com/Travel/Asia/China/i-xhrhpkj/0/51e59104/1920/MVI_0206-1920.mp4'>Custom Video - External</a>

      The above results in the following:
      Custom Video – External

    • Note that WP’s inbuilt way of embedding an HTML5 video on your website works using the native [video][/video] shortcode:
      [video width="1920" height="1080" mp4="https://photos.smugmug.com/Travel/Asia/China/i-xhrhpkj/0/51e59104/1920/MVI_0206-1920.mp4"][/video]

Lightbox Support for Videos (🔗)

The following lightbox scripts work for all types of videos (external photo services, YouTube / Vimeo and self-hosted):

  • Colorbox
  • Fancybox
  • Fancybox2 (not distributed with Photonic because it is not GPL)
  • Fancybox3
  • Featherlight
  • Lightcase
  • LightGallery
  • PhotoSwipe
  • Swipebox

The following lightbox scripts support YouTube / Vimeo videos but not the other types:

  • PrettyPhoto
  • Strip (not distributed with Photonic because it is not GPL)

The following lightbox scripts support no videos whatsoever:

  • Image Lightbox