Resize Images On-the-Fly With S3, Lambda, and API Gateway

I have been looking for solutions to serve optimized images using a CDN when I stumbled on this article:

Reasons for wanting a better delivery of images are best outlined in this article:

What Is Image Optimization And Why Is It Important For A Website?.

How great would it be to be able to use:

<img
 srcset="
  {BUCKET}/600x600/theshot.jpg 600w,
  {BUCKET}/1000x1000/theshot.jpg 1000w,
  {BUCKET}/3000x3000/theshot.jpg 3000w
 "
 src="{BUCKET}/600x600/theshot.jpg"
>

by storing just the one image and serving an optimized image via a CDN.

Community Page
Last updated: