Skip to content

Vue 2 breaks native image lazy loading #12207

@markussorg

Description

@markussorg

Version

2.6.14

Reproduction link

https://jsfiddle.net/hdutLfz7/

Steps to reproduce

  1. Open https://jsfiddle.net/hdutLfz7/
  2. Open Chrome Dev-Tools Network-Tab
  3. Click "Run"
  4. See all images get loaded "at once" (this shouldn't happen, because we have native loading="lazy" enabled on the images)
  5. Clear Network-Tab
  6. Remove "new Vue.." in JS-Tab (Remove Vue)
  7. Click "Run"
  8. Scroll the page and watch Network-Tab (images get loaded lazily --> expected behavior)

What is expected?

Images get loaded lazily

What is actually happening?

Images get loaded all at once


I wanted to add native image loading to my site and it didn't work when I added the tag loading="lazy" on my images. After I removed Vue from the site, it worked.

Tested with latest Chrome: Version 92.0.4515.107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions