Open Moschn opened 5 years ago
We already use ImageMagick, so 4 might be easy to implement..maybe using a query parameter, like compress
?
Additionally, caching for images should make sense, as noted by @temparus in #389 .
I did not know that the API already uses ImageMagick. A compress
query parameter would be a nice solution. Maybe even combined with a validator rule?
Caching would decrease the load on the server but the bandwidth to the user would not change. E.g., as a mobile user, I do not want to download 14mb every time I open the AMIV website and I do not really care if the image is cached or not.
How do you imagine the validator rule? We do not want to force event people to store e.g. the poster anywhere else than in the API -- which file size would you recommend to not cause any problems?
And regarding your second point: It's true that the first time you open the website, you won't save data, but the website doesn't change that frequently, so I think it would save you bandwidth if the image is already cached.
Ah you are talking about that kind of cache. This obviously makes sense...
I do not think that people would go somewhere else to store their images. If we enforce a rule of lets say 1Mb per image then only extremely large images will have issues. The biggest resolution we are talking about would maybe be 1920x1080 for the infoscreen and an uncompressed image with 32bit per pixel would be around 8Mb of size. I am convinced that losless compression on any poster would lead to a file size of less than 1Mb. If the users are unable to compress it themselves, we can point them to the compress
option.
Many events contain posters that are in the order of multiple megabytes. The current AMIV website downloads 14Mb of files, and all of the big files are images from events.
I think there are four solutions to this problem:
In my opinion, we should go with option 3 or 4.