Codeberg/Documentation
42
199
Fork
You've already forked Documentation
161

Transcode images to AVIF #368

Closed
opened 2023年11月12日 12:52:57 +01:00 by YellowComet · 2 comments
Contributor
Copy link

As of writing, docs.codeberg.org offers images in both PNG and WebP formats.

I propose we also introduce AVIF. AVIF has better compression than WebP, resulting in a smaller file. It is also a royalty-free format (uses AOMedia Video 1, a royalty free format as well).

For example, attached to this issue is a transcode of user-settings.png to AVIF using FFmpeg with default settings. File size is reduced from the 46.0 KiB of the PNG version to 20.9 KiB. For comparison, the current WebP version's size is 26.4 KiB

Browsers without AVIF support will fallback to either the WebP or PNG versions, so they would still be supported.

As of writing, docs.codeberg.org offers images in both PNG and WebP formats. I propose we also introduce [AVIF](https://en.wikipedia.org/wiki/AVIF). AVIF has better compression than WebP, resulting in a smaller file. It is also a royalty-free format (uses AOMedia Video 1, a royalty free format as well). For example, attached to this issue is a transcode of [user-settings.png](https://codeberg.org/Codeberg/Documentation/src/commit/df95d702437d0d69501e4684d06445dd754cdf74/assets/images/security/user-settings.png) to AVIF using FFmpeg with default settings. File size is reduced from the 46.0 KiB of the PNG version to 20.9 KiB. For comparison, the current WebP version's size is 26.4 KiB Browsers without AVIF support will fallback to either the WebP or PNG versions, so they would still be supported.
Author
Contributor
Copy link

If no-one does it before me, I will ideally get to this after Codeberg/Documentation#367 and Codeberg/Documentation#240 (which I plan on doing) are done, since they both introduce new images.

If no-one does it before me, I will ideally get to this after Codeberg/Documentation#367 and Codeberg/Documentation#240 (which I plan on doing) are done, since they both introduce new images.
Contributor
Copy link

Related to #152: Using Eleventy's image plugin to automatically produce all three formats seems like the sound solution.

Related to #152: Using Eleventy's image plugin to automatically produce all three formats seems like the sound solution.
Sign in to join this conversation.
No Branch/Tag specified
main
renovate/mstruebing-editorconfig-checker-3.x
renovate/lycheeverse-lychee-0.x
renovate/markdownlint-cli2-0.x
renovate/markdown-it-14.x
renovate/davidanson-markdownlint-cli2-0.x
renovate/node-lts-slim
renovate/npm-pnpm-vulnerability
ci_pr_close_no_preview
pr-554
pr/554
gitea-icons-shortcode
No results found.
Labels
Clear labels
Codeberg Pages
Issues affecting Codeberg Pages
Documentation Usability
Issues related to using and reading docs.codeberg.org
Forgejo
Good First Issue! 👋
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Question
Kind: Security
Licensing
Part: Generator
This is related to the generation of the documentation, not to the content itself
Priority: High
The priority is high
Priority: Low
The priority is low
Priority: Medium
The priority is medium
Reviewed: Confirmed
Something has been confirmed
Reviewed: Duplicate
Something exists already
Reviewed: Invalid
Something was marked as invalid
Reviewed: Wontfix
Something won't be fixed
Status: Blocked
Status: Help wanted
Contributions are welcome!
Status: In progress
Work is in progress
Status: Needs feedback
Feedback is needed
Status: Ready for Review
Work is completed
Status: Review
Review is in progress / Reviewers wanted
Status: Stale
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Documentation#368
Reference in a new issue
Codeberg/Documentation
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?