Performance: Image tag usage
HIGH IMPACT
This affects page load speed and visual stability by controlling how images load and display.
<img src="small-image.webp" width="600" height="400" loading="lazy" alt="Description">
<img src="large-image.jpg">
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Image without size or lazy loading | Minimal DOM nodes | Triggers reflow on image load | High paint cost due to large image | [X] Bad |
| Image with width, height, and lazy loading | Minimal DOM nodes | Single layout calculation | Lower paint cost with optimized image | [OK] Good |