From e976c61214bc96d8c7acebca0be0aad7342074e8 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Tue, 3 Sep 2024 16:14:30 +0530 Subject: [PATCH 1/2] AVIF support checking --- plugins/webp-uploads/tests/test-avif-support.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/webp-uploads/tests/test-avif-support.php diff --git a/plugins/webp-uploads/tests/test-avif-support.php b/plugins/webp-uploads/tests/test-avif-support.php new file mode 100644 index 0000000000..5cd72e8754 --- /dev/null +++ b/plugins/webp-uploads/tests/test-avif-support.php @@ -0,0 +1,14 @@ +assertTrue( wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ), 'Mime type image/avif is not supported.' ); + } +} From 9e9af858741207258c1e5a7c5689d76e0667ccc7 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Tue, 17 Sep 2024 15:09:34 +0530 Subject: [PATCH 2/2] Check WebP support --- plugins/webp-uploads/tests/test-avif-support.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/webp-uploads/tests/test-avif-support.php b/plugins/webp-uploads/tests/test-avif-support.php index 5cd72e8754..f954432652 100644 --- a/plugins/webp-uploads/tests/test-avif-support.php +++ b/plugins/webp-uploads/tests/test-avif-support.php @@ -10,5 +10,6 @@ class Test_Avif_Image_Support extends TestCase { public function test_avif_support(): void { $this->assertTrue( wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ), 'Mime type image/avif is not supported.' ); + $this->assertTrue( wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ), 'Mime type image/webp is not supported.' ); } }