Performance: Background size
MEDIUM IMPACT
Background size affects how background images are scaled and rendered, impacting paint and layout performance.
background-image: url('optimized-image.jpg'); background-size: 100% 100%;
background-image: url('large-image.jpg'); background-size: cover;
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| background-size: cover with large image | none | none | high (large paint area) | [X] Bad |
| background-size: 100% 100% with optimized image | none | none | low (small paint area) | [OK] Good |