Lazy load enabled for photoswipe integration

Created on 12 August 2024, 3 months ago
Updated 19 August 2024, 3 months ago

I have Splide successfully working with the Photoswipe module . One issue I've noticed is on some content where there are multiple images in the slider, the pages seem to take a very long time to load.

Here is an example:
https://www.kobejet.com/en/lesson/going-trip-country-presentations

I believe this is because the full-size images for the Photoswipe integration are not being lazy loaded. I found this issue in the Photoswipe issue queue that appears related, and also makes it seem like lazy-loading should be something capable of being turned on with core lazy loading, though I can't find that option, and it doesn't seem to be available in the image (Splide) config settings or field config settings (in Layout Builder).
https://www.drupal.org/project/photoswipe/issues/3115456 Support "Lazy-load" module Closed: won't fix

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @w01f
  • 🇮🇩Indonesia gausarts

    Thank you.

    Not clear, but solutions exist.

    Depending on your setup: entity, vanilla, media, w/wo views, etc. formatters, the existing solutions might confuse you.

    At any rate, the quickest solution would be just using Blazy PhotoSwipe sub-module.

    Applicable to both Vanilla and Non-Vanilla formatters as long as you are not confused by nested view modes.

    Then you can have a regular Image to PhotoSwipe option under Media switcher option.

  • 🇺🇸United States w01f

    Sent you an email - happy to report back on the solution pending getting it sorted out.

Production build 0.71.5 2024