Vignesh Subramanian
Vignesh Subramanian

Reputation: 7289

base64 format image making a server request

i convert an image to base64 format

and i changed

<asp:ImageButton ID="ImageButton2" ImageUrl="Images/Icon.png" 

to

<asp:ImageButton ID="ImageButton2" ImageUrl="data:base64;
iVBORw0KGgoAAAANSUhEUgAAACoAAAAoCAYAAACIC2hQAAAACXBIWXMAAAsTAAA......."

When i ran the application and opened network tab, i filtered using image requests, i saw that base 64 image also got captured.

enter image description here

So does it means that this is making a server hit?

Upvotes: 0

Views: 210

Answers (1)

pythonpapi
pythonpapi

Reputation: 26

A base64 encoded image will not hit the server. What the base64 is is literally the image data represented in base64 format. It'll just add onto the file size of wherever your CSS styling is (whether in a stylesheet or inline).

Upvotes: 1

Related Questions