
Why do websites use src=data:image/png;base64 - paulpauper
Many websites use src=data:image&#x2F;png;base64 for images. It results a huge string of gibberish that renders a small image. What advantage does this have over just uploading the image and linking to it? Wouldn&#x27;t the huge string of gibberish slow the site down by increasing the memory size of the page?
======
yrezgui
For some websites, the cost of making a new HTTP request to get the image is
higher than inlining it in the page in terms of performance

~~~
schoen
For example, in terms of latency because of the network round-trips to
establish the connection (or even just to send an additional HTTP request
inside the existing session and wait for a reply!).

