Flow for iOS application that saves images and has a PHP backend: how to increase speed? -


i have ios application, , saves images user profiles. have page user can see other users. have endpoint on php backend allows me fetch image given user id. able to:

1) take picture on phone

2) save picture user in database (using base64 encoded string representation of png of image)

3) re-download image string in base64

4) display image on page user

the problem is, though, these blobs on backend big (about 2.5mb each), , takes 20-30 seconds per image load or upload. there better way of doing this, increase performance?

quick summary of spoke in comments:

  1. use gzip transfer (expected 25% increase of speed due base64 encoding)
  2. store images jpeg, performing

nsdata *data = uiimagejpegrepresentation(image, 0.5); magic constant 0.5 number found still give image quality still heavy compression

  1. optionally reduce resolution of image

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -