The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Opinion on lazy loading images?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #46145

    Hey Guys

    I have a client site which is quite image heavy (blog is mainly image based, gallery, etc).

    My initial thoughts were to lazy-load the images to speed up the initial page load time. However to do this, the markup would be something like this…

    using this [plugin]( “lazy load plugin”) (or similar).

    Now as you can see the actual image is not in the image tag, but in a data attribute, and the problem with this is two things…

    1. No JS fallback
    2. No actual images in markup (the images for this blog get a lot of traffic in google, so this would be a big problem as there would be no images for google to index).

    My solution would be to have an additional (noscript) tag with the full path to the images like so…

    So while this would solve the JS fallback issue, do you think having important content (images) in noscript tags is safe? Would it still be indexed by google, appear in google images, etc?

    Or is it too much of a sacrifice to have images lazy loading?

    Would love to hear some thoughts on this. Thanks in advance.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.