Images and Thumbnails
The browser sends Accept: image/avif,image/webp,*/*
HTTP header when requesting for images.
UI: Static assets
The UI should use the default .png/jpg
images when image/webp
is not specified in the Accept
header. .webp
should only be used if image/webp
is listed.
This requires an update to our current code because we now only provide webp
imagery.
UI: Dynamic assets
We use repositoryDownloadUrl(...)
to generate the full URL to the specified RepositoryImage | RepositoryFile
. repositoryThumbnailUrl(...)
is to generate the URL for a thumbnail or the full-size image (depending on width
and height
parameters).
The generated thumbnail URL is `https://cdn1.genesys-pgr.org/repository/d/_thumbs/bf2/bf213552-dd6b-47a9-9eb8-e0f45c86c102/300x300.jpg
When the image/webp
is supported by the client, we can just provide a link to the webp
version of the thumbnail image: ..._thumbs/bf2/bf213552-dd6b-47a9-9eb8-e0f45c86c102/300x300.webp
API implementation in genesys-pgr/genesys-server!691.