Bird
0
0

How can you combine responsive images and lazy loading in a WordPress theme for better performance?

hard📝 Application Q9 of 15
Wordpress - Custom Theme Development
How can you combine responsive images and lazy loading in a WordPress theme for better performance?
AUse background images with CSS only
BUse fixed image sizes and no lazy loading
CUse srcset attribute with loading='lazy' on img tags
DLoad all images immediately without attributes
Step-by-Step Solution
Solution:
  1. Step 1: Understand responsive images

    srcset attribute allows browser to choose image size based on device.
  2. Step 2: Add lazy loading

    loading='lazy' delays image loading until needed, improving speed.
  3. Final Answer:

    Use srcset attribute with loading='lazy' on img tags -> Option C
  4. Quick Check:

    Responsive + lazy loading = srcset + loading='lazy' [OK]
Quick Trick: Combine srcset and loading='lazy' for fast responsive images [OK]
Common Mistakes:
  • Using fixed sizes disables responsiveness
  • Relying on CSS backgrounds only
  • Loading all images immediately

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes