uksz
uksz

Reputation: 18699

Is there performance difference in image source file than base64?

I am wondering if there is a performance difference between using pictures as base64, compared to using actual files, that user has to download on fly.

Upvotes: 0

Views: 64

Answers (2)

Quentin
Quentin

Reputation: 943564

An image with an HTTP URL of its own:

  • Requires a separate HTTP request (which is slow on HTTP 1 but fast on HTTP 2)
  • Can be loaded in parallel with the resource that references it
  • Can be cached so it doesn't need to be requested for subsequence pages or reloads of the initial page
  • Probably requires fewer bytes to transfer than a Base64 equivalent

Upvotes: 1

Evinn
Evinn

Reputation: 153

using pictures as base 64 would be reduced the loading of images in webpage rather than downloading the source images.

dont really sure because external source images would be got cached by browser anyway after first load.

and looks like the base64 did not got cahced from browser

you can do some research from this:

https://varvy.com/pagespeed/base64-images.html

Upvotes: 0

Related Questions