Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Genesys Backend Genesys Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #631
Closed
Open
Created Mar 15, 2022 by Matija Obreza@mobrezaOwner

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.

Updated for webp support

In this ticket we extend our RepositoryDownloadController to check if requested extension is .webp or .jpg.

We also need to check if the requested width and 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 webp and jpg versions -- and store both copies in bytes storage.

Assignee
Assign to
Time tracking