HTML·Advanced·Conceptual·1 min read
Why is decoding="async" sometimes added to an img?
Short interview answer
It tells the browser it doesn't need to block rendering of other content while decoding that particular image, which can reduce jank when a large image finishes downloading but hasn't been decoded yet; it doesn't change what or when the image is fetched, only how its decode is scheduled relative to other work.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.