Skip to content

Commit

Permalink
Add webp extension. Fix: files with webp doesn't process responsive i…
Browse files Browse the repository at this point in the history
…mages (#3242)
  • Loading branch information
websitevirtuoso authored Apr 17, 2023
1 parent e4b07c2 commit c6c1234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Conversions/ImageGenerators/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function requirementsAreInstalled(): bool

public function supportedExtensions(): Collection
{
$extensions = ['png', 'jpg', 'jpeg', 'gif'];
$extensions = ['png', 'jpg', 'jpeg', 'gif', 'webp'];
if (config('media-library.image_driver') === 'imagick') {
$extensions[] = 'tiff';
}
Expand All @@ -29,7 +29,7 @@ public function supportedExtensions(): Collection

public function supportedMimeTypes(): Collection
{
$mimeTypes = ['image/jpeg', 'image/gif', 'image/png'];
$mimeTypes = ['image/jpeg', 'image/gif', 'image/png', 'image/webp'];
if (config('media-library.image_driver') === 'imagick') {
$mimeTypes[] = 'image/tiff';
}
Expand Down

0 comments on commit c6c1234

Please sign in to comment.