Skip to content

Commit

Permalink
Merge pull request #12 from janki1/feature/webp-convertor
Browse files Browse the repository at this point in the history
Feature/webp convertor
  • Loading branch information
janki1 authored Mar 8, 2024
2 parents e9205ac + a745193 commit edaedcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/models/ImageToWebP.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function upload($folder)
switch ($file->extension) {
case 'png':
$imageToConvert = imagecreatefrompng($filePath);
imagepalettetotruecolor($imageToConvert);
break;
default:
$imageToConvert = imagecreatefromjpeg($filePath);
Expand Down

0 comments on commit edaedcb

Please sign in to comment.