Serving resized S3 images on the fly
#5 Serving thumbnails
Let’s create an MVP and serve random thumbnails
3 min readAug 31, 2022
If you didn’t notice — this is part of a series
Serving thumbnails
The reason for the app is to dynamically create thumbnails of images stored in a remote source (AWS S3 bucket in this case).
Below is the UML sequence diagram of a typical request:
The URL /t/fixed/100x100/webp/a/b/c/1.jpeg
can be broken down into the following parts:
/t/
is just a prefix of the route (a shortcut for thumbnail)fixed
is the name of the resize strategy to usewebp
is the requested output format of the thumbnaila/b/c/1.jpeg
is the id of the image in the source
By design, the application should:
- support multiple resize strategies
- support multiple output formats
- allow any image id to be passed
(eg.foo/bar/image.jpeg
ordir/name/files/source.jpg
)