3 ms·
It's simpler to store the original image, then generate URLs like http://image-server.com/resize?url=http://s3.com/original.jpg&width=300&height=200 http://imag
by joevandyk 13y ago
It's simpler to store the original image, then generate URLs like http://image-server.com/resize?url=http://s3.com/original.jpg&width=300&height=200 http://image-server.com/resize?url=http://s3.com/original.jp...
This lets you change the size of thumbnails by only changing the URLs.
I've been doing it for years, works great.
- brandon272 13y agoDoesn't this mean that the server needs to manually process the image on each request?
- michaelmior 13y agoYou should stick a CDN in front so this doesn't happen. Ideally once the server generates the image, it would also be cached there.
- joevandyk 13y agoYou probably want nginx in front of pillbox. Nginx setup as a basic http proxy cache. So, CDN -> nginx -> pillbox. This is because CDNs can send lots of concurrent requests to the origin server if lots of people are requesting the same new image simultaneously.