Sitemaps
Questions
DiscussionsQuestionsExperts

Questions

iOS Development

Should our photo sharing app use Base64 Strings or Files using URLs to display images?

1. Speed: What is faster in speed to send/receive images? Base64 or loading images via url 2. Data: what will take up more data on users phone? 3. Image clarity: what will give us a better image?

Answer This Question

3

Answers

Steve Derico

iOS Developer and Author of "Introducing iOS 8"

We have been asked this question before and it really depends on the situation and use case.

1. In depends on many factors.
2. Base64 encoding enlarges file sizes by up to 33%
3. If quality is your focus, I recommend URL/URIs.

I would love to hear more about this project and provide some more insight. Let me know if you have any other questions.

-Steve

Answered almost 11 years ago

Alexandre Marcondes

Software Developer & Polymath Aspirant

I think that image file URLs are best and this is why:

* Base64 Strings and Files might have the same quality if your string is a encoded version of your image file
* Base64 Strings are much bigger than binary files (Usually 33% bigger) - http://davidbcalhoun.com/2011/when-to-base64-encode-images-and-when-not-to
* You only need Base64 when delivering the image using channels that are 7-bit encoded like emails, text files, CSS, HTML or other medium that only allows lower ascii characters.
* Gzipped images have the shortest size and pure binary image files are the faster to decode/display

Answered almost 11 years ago