resize image on Amazon S3 timthumb

779 Views Asked by At

i have created amazon S3 bucket for saving images. Earlier i was using timthumb to server thumbnail for images. Now with S3 using timthumb is not a good idea as images will be downloaded to EC2 and then to client. Should I upload two copied of images to S3 one original and one for thumbnail. Any suggestions.

1

There are 1 best solutions below

0
Jiju Thomas Mathew On

The best method would be to leverage the AWS service itself. Since you were using the timthumb plugin, the thumb generation would be the same. S3 can fire a lambda function on any event.

http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser.html

There are AWS lambda code which can generate thumbnails based on configured values. The AWS Lambda console itself has some of them which you could tweak into a working system. The link to the console will not work unless you are logged in.

Disclaimer: I am a third party solution consultant and not directly working for AWS.