Bird
0
0

How can you combine Remix Image optimization with lazy loading for better performance?

hard📝 Application Q9 of 15
Remix - Performance
How can you combine Remix Image optimization with lazy loading for better performance?
AWrap Image in a div with CSS display:none initially
BSet width and height to zero to delay loading
CUse a separate library to lazy load images outside Remix
DAdd the <code>loading="lazy"</code> prop to the Image component
Step-by-Step Solution
Solution:
  1. Step 1: Know lazy loading attribute

    Adding loading="lazy" tells the browser to load images only when near viewport.
  2. Step 2: Evaluate other options

    Hiding images or zero size delays display but not proper lazy loading; external libraries add complexity.
  3. Final Answer:

    Add the loading="lazy" prop to the Image component -> Option D
  4. Quick Check:

    Lazy load with loading="lazy" prop [OK]
Quick Trick: Use loading="lazy" for built-in lazy loading [OK]
Common Mistakes:
MISTAKES
  • Hiding images with CSS
  • Using zero width/height
  • Ignoring built-in lazy loading

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes