Photonic Version 2.80 – PhotoSwipe v5 and Stability

I released version 2.80 of Photonic last evening with the following changes.

  1. New Features
    I added support for PhotoSwipe v5. Photonic has had support for PhotoSwipe since October 2018, but that was for v4, which is still the predominant version out there. The new v5 version is a rewrite from the ground-up. However, like the v4 version, I am distinctly underwhelmed by v5. There are several reasons for this, primary being that hands down, it is the hardest plugin to integrate:

    • At a very fundamental level, it has no UMD version available. This makes it inefficient for use in multi-plugin setups, where one or more plugins from different developers might be using it.
    • It needs the sizes of photos to be pre-determined. This poses a wrinkle for cases where the photos may be pulled from external locations and do not come with a size assigned (e.g. Instagram). This is unlike any other lightbox, which is able to compute sizes on the fly.
    • There is no out-of-the-box support for videos (YouTube / Vimeo, or HTML5 videos). While there are several other lightbox scripts that don’t support videos, you can generally jump through some hoops to set it up. For PhotoSwipe this was harder than most cases.
    • Many basic concepts are not supplied out of the box, e.g. captions. You can add them, but that needs custom code.
    • Even with all shortcomings, the minified JS is still > 60 KB.
  2. Bug Fixes
    The following fixes have been applied:

    • There was a corner-case scenario with Google Photos, where transients were blank, but the access token was not getting generated.
    • The generated CSS had a blank “px” value.
    • Apostrophes and quotes were getting prefixed with a “\” in lightbox captions.
    • The vanilla form for shortcode generation was not rendering select lists properly

Hope you enjoy the release!