Improve the quality of the rendered diagrams (#1999)

The first commit allows to lazy-load the diagrams, which should improve the loading time of the CS API on mobile. In the process it also improves the alt text of the images.

The second commit serves the diagrams as high-resolution WebPs. Encoding a high resolution diagram as WebP gives a file of approximately the same size as the lower resolution PNG. For maximum compatibility we also serve them as a lower resolution WebP and a fallback PNG. WebP was chosen because it is one of the export formats of draw.io/diagrams.net, and it is widely available in modern browsers.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-11-19 22:41:45 +01:00 committed by GitHub
parent d5c56a4f17
commit 9882d95775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 69 additions and 9 deletions

View file

@ -0,0 +1 @@
Improve the quality of the rendered diagrams