The Software Heritage browse web application currently supports the rendering of images (in the README panel inside a directory view or directly in a content view) but also PDF files (only in a content view).
Nevertheless, when those images or pdfs have a large size, they are not adjusted to fit the main content panel of the web application (see for instance the rendering of this [[ https://archive.softwareheritage.org/browse/directory/eca4d31858a749c22b3125bc5a318e5a34eeffd3/ | README ]], this [[ https://archive.softwareheritage.org/browse/content/sha1_git:56acca77234d9c8e4965094904eadd996ae30edb | image ]] or this [[ https://archive.softwareheritage.org/browse/origin/https://github.com/obfusk/bash-cheatsheet/content/bash-cheatsheet.pdf/ | pdf ]]).
In order to offer a better rendering of those contents, their size should be adjusted when it overflows the main content panel.
For the image adjustements, the CSS [[ https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit | object-fit ]] property should be used.
For the pdf size adjustements, this should be feasible using the [[ https://mozilla.github.io/pdf.js/ | pdf.js ]] API.