[eluser]Skinnpenal[/eluser]
Hi guys!
What solution do you use for generating image size variations?
(in the setting where you'd have a web-app where users could upload images for use in articles and other content)
I generally come across two solutions:
1. Generate variations in predefined sizes uppon upload
2. Generate a variation uppon request
None of these sticks out as an optimal solution to me.
Some concerns:
For solution #1 you'd generate all variations for all files, so most likely you'd end up with a lot of files that would never be used. But the main issue here as I see it is if the design changes and the need for image size variations with it.
For solution #2 you'd get around the issue above, but the only way to define sizes would be in the url somehow, and even though cached a person up to no good could easily create tons of requests by changing the size a pixel and I'd risk both running out of cpu/ram in the resizing process and out of hd space for the results.
I'm sort of leaning towards solution #2, but are there any ways to avoid its issues?