Efficiency of base64 encoding for images

892
2
Jump to solution
03-20-2017 08:27 AM
WarrenMedernach
Occasional Contributor III

Hello all,

I wanted to inquire about the efficiency of base64 encoding of images in the web appbuilder config.json file.  I can definitely see the advantage of encoding the image in the json file in some deployment scenarios, but I'm questioning the use of it when the app is running on our own servers/infrastructure.

IOW, is using the base64 encoding of images in my config.json file going to be more efficient, or perform better, than simply referencing the local image files?


Thanks,
Warren M

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Warren,

  I do not think that encoding the image will be more efficient. The config file will be larger and take more time for the client to download with that info in it. Base64 image encoding is great for situations when the image will be on a different source machine then the app and may have a slow responce, but it is not something to do if only looking for efficiency.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Warren,

  I do not think that encoding the image will be more efficient. The config file will be larger and take more time for the client to download with that info in it. Base64 image encoding is great for situations when the image will be on a different source machine then the app and may have a slow responce, but it is not something to do if only looking for efficiency.

WarrenMedernach
Occasional Contributor III

Thanks for the confirmation Robert, and yes, the config.json file exponentially smaller once all of the base64 encoding is replaced with the file locations... from over 2mb to to just over 100kb!

0 Kudos