AVIF is an image file format with the following attractive features:
➀ higher bit depths are supported (not only 8-bit, but also 10-bit and 12-bit colour components are possible) and thus HDR and WCG images look better (colour banding is reduced),
⓶ support of AVIF in Mozilla Firefox is a bit delayed because of a bug in its colour conversion (see https://bugzilla.mozilla.org/show_bug.cgi?id=1682995#c24 for details), but AVIF support is still likely to land later in April or in May,
⓷ WebKit (the browser engine of Safari) has got its AVIF support in early March (see https://bugs.webkit.org/show_bug.cgi?id=207750 for details) and thus an AVIF-supporting Safari version is likely to be released in the future.
Hence the suggestion here is that Telegram should also support AVIF images and let its users decide how an AVIF file is sent, providing the three options:
⑴ As a file: iconified representation, visible filename and filesize, optional caption, 2 GB limit on filesizes, currently the only option for AVIF.
⑵ As an image: wide representation (equal to messages' width), suppressed transparency, optional caption, 1280 pixels limit on width and height.
⑶ As a sticker: narrower representation, supported transparency, no caption, 2 MB limit on filesizes.
Refraining from AVIF-to-AVIF recompression, Telegram should limit the server-side image processing to a few simple (not CPU-intensive) tasks, such as:
⒈ Privacy protection by removing metadata (such as geotags) from the images.
⒉ Steganography suppression by removing behind-the-tail data (similar to RARJPEG) from the images.
⒊ Rejecting the images that won't fit in the enforced constraints.
It's okay for Telegram to enforce many constraints on AVIF images as long as the rules are public, for example:
① “Filesize shall not exceed 2 MB” (such is the current rule for stickers in WebP files).
② “File shall not contain more than 6553600 pixels” (such is the current rule for stickers in WebP files in Telegram Desktop).
③ “The number of bytes shall not exceed the half of the number of pixels” (if Telegram decides to limit the quality of smaller files).
If the image does not fit, then it might be silently “sent as a file” (for example, that is exactly what currently happens if a WebP file is larger than 2 MB and thus deemed unfit for a sticker in Telegram) or rejected with an error.
When a PNG file is being sent, Telegram should offer PNG-to-AVIF compression as an alternative to PNG-to-JPEG and probably even prefer the former.
Telegram should also consider using AVIF images (instead of JPEG images) where recompression is desirable: AVIF thumbnails, AVIF small avatars, AVIF previews (under messages that refer to images or to illustrated web pages), etc.
Telegraph (the site, not the Graph Messenger) should also support AVIF images and let its users upload AVIF files or embed them by URLs pasted on empty lines. The uploaded AVIF files (like the already supported PNG uploads) should not be recompressed after upload or face worse limits than the usual 5 megabytes.
M
Moritz
When it´s license free, it´s a good addition to WebP
The same announcement tells us that later (in October) AVIF support in Safari 16.0 will be available on macOS 13 (Ventura) and also on the newest iPadOS.
Сергѣй Юрьевичъ Соколовъ
Safari 16.1 is released.
It is mentioned (in Safari's list of features) that both flavours of AVIF images (still images and animated AVIF) are supported on iOS 16, and on iPadOS 16, and on macOS 13 (Ventura).
Safari is known to use the underlying system's decoder, hence these three systems themselves (iOS 16, iPadOS 16, macOS 13) are probably able to decode AVIF.
Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
⒈ Privacy protection by removing metadata (such as geotags) from the images.
⒉ Steganography suppression by removing behind-the-tail data (similar to RARJPEG) from the images.
⒊ Rejecting the images that won't fit in the enforced constraints.
It's okay for Telegram to enforce many constraints on AVIF images as long as the rules are public, for example:
① “Filesize shall not exceed 2 MB” (such is the current rule for stickers in WebP files).
② “File shall not contain more than 6553600 pixels” (such is the current rule for stickers in WebP files in Telegram Desktop).
③ “The number of bytes shall not exceed the half of the number of pixels” (if Telegram decides to limit the quality of smaller files).
If the image does not fit, then it might be silently “sent as a file” (for example, that is exactly what currently happens if a WebP file is larger than 2 MB and thus deemed unfit for a sticker in Telegram) or rejected with an error.
When a PNG file is being sent, Telegram should offer PNG-to-AVIF compression as an alternative to PNG-to-JPEG and probably even prefer the former.
Telegram should also consider using AVIF images (instead of JPEG images) where recompression is desirable: AVIF thumbnails, AVIF small avatars, AVIF previews (under messages that refer to images or to illustrated web pages), etc.
Telegraph (the site, not the Graph Messenger) should also support AVIF images and let its users upload AVIF files or embed them by URLs pasted on empty lines. The uploaded AVIF files (like the already supported PNG uploads) should not be recompressed after upload or face worse limits than the usual 5 megabytes.
① Android 12 is released and it supports AVIF: https://android-developers.googleblog.com/2021/10/android-12-is-live-in-aosp.html
② Firefox 93 is released and it supports AVIF: https://www.mozilla.org/en-US/firefox/93.0/releasenotes/
The same announcement tells us that later (in October) AVIF support in Safari 16.0 will be available on macOS 13 (Ventura) and also on the newest iPadOS.
It is mentioned (in Safari's list of features) that both flavours of AVIF images (still images and animated AVIF) are supported on iOS 16, and on iPadOS 16, and on macOS 13 (Ventura).
See https://webkit.org/blog/13399/webkit-features-in-safari-16-1/#animated-avif for details.
Safari is known to use the underlying system's decoder, hence these three systems themselves (iOS 16, iPadOS 16, macOS 13) are probably able to decode AVIF.
It is reasonable to expect that in 2024 the AVIF format will be widely used as the latest and the best tool for the lossy compression of images.
WebP becomes the previous one — and JPEG is just the predecessor's predecessor.
The correct URL is https://learn.microsoft.com/en-us/deployedge/microsoft-edge-relnote-archive-stable-channel#version-1210227783-january-25-2024