From 769a8ee6c90cc408855d5e6813634ce483a946f3 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 2 Oct 2024 11:23:27 +0545 Subject: [PATCH] Remove JPEG fallback for webp - Now that safari supports webp but without the appropriate header, remove the fallback --- app/controllers/api/storage.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index ca248c2628..4e30832a67 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -889,10 +889,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') throw new Exception(Exception::STORAGE_FILE_NOT_FOUND); } - if ((\strpos($request->getAccept(), 'image/webp') === false) && ('webp' === $output)) { // Fallback webp to jpeg when no browser support - $output = 'jpg'; - } - $inputs = Config::getParam('storage-inputs'); $outputs = Config::getParam('storage-outputs'); $fileLogos = Config::getParam('storage-logos');