Merge pull request #8746 from appwrite/fix-remove-jpeg-fallback

Remove JPEG fallback for webp
This commit is contained in:
Damodar Lohani 2024-10-02 11:49:30 +05:45 committed by GitHub
commit 36aa38c58e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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');