Devi, we don't want to serve locally. These URLs are image generators that do a 301 redirect to the permanent URL, which is currently on S3 but may be on a CDN.
Any of these URL formats works for me:
/file/<name> (original file)
/file/<name>?size=123
/file/<name>?size=123x456
/file/<name>?x=123&y=456
/file/<name>/123
/file/<name>/123x456
Single numbers imply the same value on both x and y axis.
We could have another endpoint /thumbnail/<name> that fits the image to the box along the smaller side and then crops the rest. This effect is used in photo galleries: Flickr and Twitter use it to get square thumbnails for photos and avatar images.
There is no image extension on these URLs because they are redirectors to the actual image files, which will have extensions.
Kiran
--
Kiran Jonnalagadda
+91-99452-35123
http://hasgeek.com/
(Sent from my phone)
--
You received this message because you are subscribed to the Google Groups "HasGeek Code" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hasgeek-code...@googlegroups.com.
To post to this group, send email to hasgee...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I see a problem with this approach.
I can maliciously try to request for a the same image for million
different sizes and cause fat s3 bill to you. Unless you've fixed
sizes, I don't think it is good idea to store resized images on s3.
Sometimes the design want to add a constraint on width and someones onthe height. I think there should be a way to only specify either width
or height. They other dimension can be computed from the original
image from the aspect ratio.
Does it mean the aspect ratio is alway maintained and whatever doesn'tfit in the given box gets cropped?
I think it is useful to have extension in the URL. As a user, it isvery irritating when I download an image and that doesn't have an
extension.