Images and Thumbnails
The browser sends
Accept: image/avif,image/webp,*/* HTTP header when requesting for images.
The Server handles thumbnail paths in
RepositoryDownloadController. It currently tests if the path starts with
THUMB_PATH = "/_thumbs" and ends with
THUMB_EXT = ".jpg" and then tries to fetch the pre-generated thumbnail directly from storage. It does not try to generate a thumbnail.
In this ticket we extend our
RepositoryDownloadController to check if requested extension is
We also need to check if the requested
height are on the list of supported thumb sizes.
If bytes do not exist in storage we trigger the generation of the requested thumbnail (in requested format (
webp|jpg and size), put the bytes in storage (async?) for future use and return the bytes in the HTTP response.
Thumbnail generation aspect
We have an aspect that generates the thumbnails when
RepositoryImage is uploaded. We need an updated
ThumbsGenerator that will generate both
jpg versions -- and store both copies in bytes storage.