From 468c8b99cde83c9e5ac226d9bf6882dea38a36c2 Mon Sep 17 00:00:00 2001 From: Jamie Barton Date: Wed, 26 Jan 2022 11:41:50 +0000 Subject: [PATCH] feat: support webp for assets --- gatsby-source-graphcms/src/gatsby-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatsby-source-graphcms/src/gatsby-node.js b/gatsby-source-graphcms/src/gatsby-node.js index 04bb2a1..d1956eb 100644 --- a/gatsby-source-graphcms/src/gatsby-node.js +++ b/gatsby-source-graphcms/src/gatsby-node.js @@ -320,7 +320,7 @@ export async function onCreateNode( if ( downloadLocalImages && node.remoteTypeName === 'Asset' && - ['image/png', 'image/jpg', 'image/jpeg', 'image/tiff'].includes( + ['image/png', 'image/jpg', 'image/jpeg', 'image/tiff', 'image/webp'].includes( node.mimeType ) ) { @@ -398,7 +398,7 @@ function makeResolveGatsbyImageData(cache) { options ) { if ( - !['image/png', 'image/jpg', 'image/jpeg', 'image/tiff'].includes(mimeType) + !['image/png', 'image/jpg', 'image/jpeg', 'image/tiff', 'image/webp'].includes(mimeType) ) { return null }