Skip to content

Commit

Permalink
feat: support webp for assets
Browse files Browse the repository at this point in the history
  • Loading branch information
notrab authored Jan 26, 2022
1 parent 297b99e commit 468c8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gatsby-source-graphcms/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
) {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 468c8b9

Please sign in to comment.