diff --git a/.changeset/empty-sheep-march.md b/.changeset/empty-sheep-march.md new file mode 100644 index 000000000000..94586dab48b6 --- /dev/null +++ b/.changeset/empty-sheep-march.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Added support for GIF to Animated WEBP images diff --git a/packages/integrations/image/src/loaders/sharp.ts b/packages/integrations/image/src/loaders/sharp.ts index e1d60e97f6ed..2368e43d1f31 100644 --- a/packages/integrations/image/src/loaders/sharp.ts +++ b/packages/integrations/image/src/loaders/sharp.ts @@ -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();