Skip to content

Not working with Lazyloaded Images #83

@jaschaio

Description

@jaschaio

I am using a lazyloading script to load images once the visitor starts scrolling. The script just takes the src and srcset attributes and replaces it with the ones prefixed with data-:

<div class="lazy" style="padding-bottom:52.33%">
    <img
        src="/img/lazyload.gif"
        alt=""
        width="1200"
        height="628"
        sizes="(max-width: 1200px) 100vw, 1200px"
        data-src="/img/image-1.jpg"
        data-srcset="/img/image-1.jpg 1200w, /img/image-1-300x157.jpg 300w, /img/image-1-600x314.jpg 600w, /img/image-1-1024x536.jpg 1024w"
    />
</div>

Unfortunately if I click on a data-pin-do="buttonBookmark" Button the Grid only displays the images which are not lazyloaded. Only if I scroll down to the end of the page and thus all src's have been replaced it displays all images correctly.

I tried loading all images before I do the "buttonBookmark" action but the pinit script doesn't seem to recognize them on the first click. I have to close the grid overlay and click again until it recognizes all images.

The same is true for the "Pinit Chrome Extension".

Is there anything I can do to make this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions