Using Image to Base64: practical guide
When to embed an image as Base64
A Base64 data URL lets you place a small image directly in HTML, CSS or JSON without a separate file request. It suits tiny icons and inline email images, and it is convenient for quick demos.
Size is the trade-off
Base64 makes the data about a third larger, and the image cannot be cached separately from the page. Use it for small files only, and keep larger images as normal files so browsers can cache them.