I am using amazon S3 and cloudfront to scale and serve my images. I use following situation:
- Images are stored on S3
- A webpage requests an image via cloudfront cdn with custom scale in url. If the image exists, it will be served from cloudfront cache. If there is no cached image, I have a php script that gets the image from s3 , resizes it and serves it ( it will be cached by cloudfront )
Is there a possibility to serve the scaled image directly from s3. Now I have to host the php script to scale the image on my personal hosting / generates traffic
example url: //mycloudfrontcdn.com/500/image.jpg