My android app needs different sized versions of images for different purpose and bandwidth preservation.
- when the user uploads their avatar or another image, my php script creates 4 versions of that image: mini_200, medium_300, big_400 and original. those paths are then taken and stored in the database. Then, when I need the smallest image, I load it from
- same as approach one, but instead of adding prefixes to the names of the files, I store them in different folders - big, medium, mini. and in My app I just pass a parameter for which folder to look in
- when the user uploads their avatar or another image, I only store the original. Then, when I need the smallest image, I load if this way:
Which one is better and why? I feel like reinventing the wheel here, because this topic is too broad and I dont know where to read about it