Skip to content

Adding img placeholder to picture tag causes lazy loading to fail. #270

@AbdellaouiSofiane

Description

@AbdellaouiSofiane

I'm trying to use lozad with a picture tag and and img placeholder like described in documentation:

 <picture class="lozad">
  <source srcset="some-image.webp" type="image/webp"> 
  <source srcset="some-other-image.jpeg" type="image/jpeg">
  <img src="data:image/jpeg;base64,/some_lqip_in_base_64==">
 </picture

Without the img placeholder, it works fine, but adding an img tag actually causes all images to be loaded (even if not within viewport) like when not using lozad at all (except the picture tag gets data-loaded=true).

I'm using Chrome Version 92.0.4515.107 (64 bits) and I'm on Ubuntu 21.04.

Am I doing anything wrong here ?

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