GUIDE深度 · Deep dive
When to Use Data URIs
Data URIs embed the image in the document, useful for small icons, single-file demos and email signatures. Downsides: about 33% larger, no separate caching, and repeated copies transfer repeatedly. Large or shared images should still use URLs.
Icons of a few KB.
Single-file demos/email.
Large images/photos.
Images reused across pages.
FAQ
Are data URIs cached?
With the document, not separately.
Does it affect SEO?
Large inline images slow pages; small icons are fine.