Skip to content

Commit

Permalink
feat(image): Add GIF -> WEBP support (#4139) (#4140)
Browse files Browse the repository at this point in the history
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
  • Loading branch information
jackmerrill and natemoo-re committed Aug 5, 2022
1 parent 1b9b78b commit 4678a3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/empty-sheep-march.md
@@ -0,0 +1,5 @@
---
'@astrojs/image': patch
---

Added support for GIF to Animated WEBP images
2 changes: 1 addition & 1 deletion packages/integrations/image/src/loaders/sharp.ts
Expand Up @@ -82,7 +82,7 @@ class SharpService implements SSRImageService {
}

async transform(inputBuffer: Buffer, transform: TransformOptions) {
const sharpImage = sharp(inputBuffer, { failOnError: false });
const sharpImage = sharp(inputBuffer, { failOnError: false, pages: -1 });

// always call rotate to adjust for EXIF data orientation
sharpImage.rotate();
Expand Down

0 comments on commit 4678a3f

Please sign in to comment.