Skip to content

Any hints on how we can implement lazy loading for image? #13

@rohit-gh

Description

@rohit-gh

since lazy loading is enabled since Chrome 76 and related browsers as seen here
How can we enabled this feature using this library.

Currently I'm trying to put the loading="lazy" in the image slot.

<vue-load-image>
        <img slot="image"
             key="primary"
             :src="image.src"
             loading="lazy"
             :alt="image.alt"/>
        <div slot="preloader" class="loading-image-wrapper">
          <img slot="preloader" class="loading-image"
               :src="loaderImage"/>
        </div>
        <div slot="error" class="image-loading-error">
          <error-image></error-image>
        </div>
      </vue-load-image>

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