Lazy Loading Injector: Add loading="lazy" to img and iframe
Adds loading="lazy" and decoding="async" to images and iframes while leaving the first images eager.
Use the tool
Why this tool exists
Native lazy loading saves data, but lazy-loading the main image delays it.
The tool leaves the first N images eager, removes loading="lazy" from them, can add fetchpriority="high" to the first one, and warns about lazy images without width and height. It edits only the tags and keeps the rest of your HTML as written.
How to use it
- Paste your HTML.
- Set how many leading images stay eager.
- Choose whether to include iframes and decoding.
- Copy the result and the change list.
Frequently asked questions
Which image is my LCP?
Check DevTools or Lighthouse; the first-N rule is a guess.
Does it touch noscript images?
No. Images in noscript and head are skipped.
What about CSS backgrounds?
They are not affected by loading attributes.
Is my HTML uploaded?
No.