Open phanduynam opened 2 months ago
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.
Currently the plugin didn't added support for WebP to AVIF image but in future if possible we can add it.
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.
@mukeshpanchal27 Thanks, I'm looking forward to this.
@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.
Currently the plugin didn't added support for WebP to AVIF image but in future if possible we can add it.
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.
@mukeshpanchal27 Thanks, I'm looking forward to this.
@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
Currently the plugin didn't added support for WebP to AVIF image but in future if possible we can add it.
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.
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