Skip to content

Commit

Permalink
Add optimize options for GIF encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Dec 31, 2024
1 parent d689be3 commit 392f3e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Encoders/GifEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function encode(ImageInterface $image): EncodedImage
{
$result = $image->core()->native()->writeToBuffer('.gif', [
'interlace' => $this->interlaced,
'optimize-gif-frames' => true,
'optimize-gif-transparency' => true,
]);

return new EncodedImage($result, 'image/gif');
Expand Down

0 comments on commit 392f3e8

Please sign in to comment.