• Resolved brabrubra


    Can I change a lazy attr ‘data-lazy-src’ to ‘data-src’?


    • This topic was modified 4 years ago by brabrubra.
Viewing 6 replies - 1 through 6 (of 6 total)
  • roam92



    Why do/would you want to do that?

    The Rocket Lazy Load plugin adds the ‘data-lazy-…’ attributes for its own purposes…

    It copies the regular attributes automatically. You shouldn’t mess with ‘data-lazy-…’.

    Thread Starter brabrubra



    This is necessary for the search robot Yandex to scan lazy images. Google with lazy images works fine, but Yandex only looks at 2 attributes: “data-src” or “data-content”.



    Well, that’s interesting – but if you put the original attributes back, then haven’t you just made the image “un-lazy” again?

    Obviously it would be better if Yandex evolved to do what Google does to properly understand lazy-loaded images… But I guess that is a wish out of our control.

    Plugin Author WP Media



    The lazyload script has an automatic detection for search engines bots. When one is detected, all images are loaded normally via the real src attribute.

    Thread Starter brabrubra


    @wp_media thank you!

    Yes, very helpful to know – thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change attr to data-src’ is closed to new replies.