-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert WebP to AVIF on upload #1557
Comments
Thanks, @phanduynam, for raising this issue. Currently the plugin didn't added support for WebP to AVIF image but in future if possible we can add it. cc. @adamsilverstein |
@mukeshpanchal27 Thanks, I'm looking forward to this. |
This should be a relatively small change. No new UI is needed, if the selected output format is AVIF and users upload a WebP we can convert them.
@phanduynam I'm curious about your use case / why you have WebP's you are trying to upload in the first place. It makes sense to "upgrade" to AVIF, but I thought most users would be coming from JPEGs. |
I'm doing a website crawl, there will be webp images, but I want them all converted to avif. Simple as that |
This change fix the WebP to AVIF transforms. diff --git a/plugins/webp-uploads/helper.php b/plugins/webp-uploads/helper.php
index 7669154b..d4a5047b 100644
--- a/plugins/webp-uploads/helper.php
+++ b/plugins/webp-uploads/helper.php
@@ -28,7 +28,7 @@ function webp_uploads_get_upload_image_mime_transforms(): array {
$default_transforms = array(
'image/jpeg' => array( 'image/' . $output_format ),
- 'image/webp' => array( 'image/webp' ),
+ 'image/webp' => array( 'image/' . $output_format ),
'image/avif' => array( 'image/avif' ),
'image/png' => array( 'image/' . $output_format ),
); |
@adamsilverstein I would like to know if this add-on applies to the 18/11 update? |
Modern Image Formats 2.2.0 does not support converting uploaded WebP files to AVIF
The text was updated successfully, but these errors were encountered: