Support » Plugin: Lazy Loader » Pinterest share button

  • Resolved wprox

    (@wprox)


    Hi Florian,

    Thanks again for the awesome plugin and support ๐Ÿ™‚

    I recently added a Pinterest share button using the Monarch plugin.

    When your lazy load plugin is active and I click on the Pinterest share button, only the images which I set to not lazy load show up in the window of images available to share. The images set to lazy load have placeholder images to represent them instead. Even after all images have lazyloaded on the page, the lazy loaded images still just have placeholder images in that “choose image” window.

    When I deactivate the lazy loader plugin, and click the pinterest share button, all the images show up nicely in the window to choose which image to share.

    The only relevant thing I found was this very similar ticket: https://github.com/aFarkas/lazysizes/issues/153

    on Sep 4, 2015
    Thank you so much for helping with this issue, it is now working using the code in your first example (using the picture element). I had to remove the ‘data:’ from the image tag to maintain the full page size on initial load and prevent resizing during scroll.

    referring to this:

    <img
    src=”data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==”
    data-src=”http://placehold.it/700×300&#8243;
    class=”lazyload”
    alt=”image with artdirection” />
    </picture>

    But I’m not sure how to use that or the other comments in that issue ticket.

    When I inspect element in my pinterest share window:

    image that I set to not lazy load in settings, shows up great:
    img src=”https://mydomain.com/&#8230;.Final-3.jpg” alt=”This is alt text.”

    image that lazy loads and shows placeholder image in this pinterest share window:
    img src=”undefined” alt=”This is alt text.”

    Thanks a lot ๐Ÿ™‚

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hey,

    the plugin already uses this pattern (there should be a data-src for each image with the .lazyload class), and I cannot reproduce the issue (I installed this plugin for a quick test: https://wordpress.org/plugins/pinterest-pin-it-button-on-image-hover-and-post/).

    Do you have other plugins installed, that modify the image markup?

    Best,
    Florian

    Thread Starter wprox

    (@wprox)

    Thanks, just deactivated amp plugins but they made no difference…

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    The site you have the issue with is still the site that is private? If not, could you post the link? If yes, could you check out the source code of your page if there is a data-src attribute for the .lazyload images?

    Best,
    Florian

    Thread Starter wprox

    (@wprox)

    Thank you Florian, the site is private and there is data-src.

    I tried that pinterest pin it button plugin that worked for you, and it works ok for me on an image by image basis. I intend to use a plugin like that one.

    But IN ADDITION to that type of Pinterest plugin, I am also using the Monarch plugin which has one sticky Pinterest social sharing button that scrolls down the page with the user. THAT Pinterest button (not attached to one image, but scrolling down the page) when clicked, opens up a window with ALL the images on the page to allow the person to choose which one to pin to Pinterest. When lazy load is off, it does that just fine. When lazy load is on, it doesn’t get most of the images, only the ones that don’t lazy load for the most part.

    Since Monarch is under the Elegant Themes membership, I’m assuming you don’t have access to it. But this plugin is more similar to what I’m describing with Monarch than the pin per image plugin you tried above:
    https://wordpress.org/plugins/sassy-social-share/

    Let me know if that offers any clues as to what the problem is…

    Thanks again!!!

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hey,

    I installed the plugin and can reproduce the issue now. I donโ€™t know how the plugin interacts with Pinterest to fetch the images from the page, but I assume it loops the img elements and saves the src. And with that, I donโ€™t see a way to fix that with the plugin, because the src attribute needs to be removed.

    You could try to run the lazySizes.loader.unveil method (https://github.com/aFarkas/lazysizes#js-api—methods) before the pinterest click for all images, so all images are loaded. But I canโ€™t say how to do that exactly to ensure it runs before the pinterest frame is loadedโ€ฆ

    Hope that helps,
    Florian

    Thread Starter wprox

    (@wprox)

    Thank you Florian for all your help!

    Still working through this with Monarch support…

    Thread Starter wprox

    (@wprox)

    Hi Florian,

    I have this at the bottom of my page, is this from your plugin?

    <script src=”https://myurl.com/min/lazyload.js”></script></body&gt;
    </html>

    Thanks!

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hey,

    no, it is not. The path to the lazyload script that my plugin uses is wp-content/plugins/lazy-loading-responsive-images/js/lazysizes.min.js.

    Best,
    Florian

    Thread Starter wprox

    (@wprox)

    Thanks again for all your help and the great plugin Florian ๐Ÿ™‚

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Pinterest share button’ is closed to new replies.