Skip to content

How to apply the plugin to images that are initially hidden when the page loads #39

@manish-in-java

Description

@manish-in-java

We have a slide show plugin that displays large images in a full screen slideshow. Since the images can take up the full screen, users upload very large images for the slideshows. The slideshows run on auto transition mode.

I would like to apply the JAIL plugin to the slideshow images so that images are loaded only when a slide shows up. Since the slideshows are on auto-transition, no specific event occurs when the slides come into view. What would be the best way to apply the plugin to this scenario?

The HTML is as follows:

<ul class="slideshow">
    <li>
        <img alt="..." src="/images/slideshow1/slide1.jpg" />
    </li>
    <li>
        <img alt="..." class="load-lazy" data-src="/images/slideshow1/slide2.jpg" />
    </li>
    <li>
        <img alt="..." class="load-lazy" data-src="/images/slideshow1/slide3.jpg" />
    </li>
    <li>
        <img alt="..." class="load-lazy" data-src="/images/slideshow1/slide4.jpg" />
    </li>
    <li>
        <img alt="..." class="load-lazy" data-src="/images/slideshow1/slide5.jpg" />
    </li>
</ul>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions