Skip to content

Commit

Permalink
Add webp to image-preview (#3532)
Browse files Browse the repository at this point in the history
* Add webp to image-preview

* Create pink-singers-glow.md

add changeset

* Update packages/graphiql-react/src/editor/components/image-preview.tsx

* Update custom-words.txt

* Update .changeset/pink-singers-glow.md

* Update packages/graphiql-react/src/editor/components/image-preview.tsx

---------

Co-authored-by: Rikki Schulte <[email protected]>
Co-authored-by: Dimitri POSTOLOV <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent 2e832f2 commit 7404e8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/pink-singers-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphiql/react": minor
"graphiql": minor
---

Add webp support to graphiql results image-preview
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ function tokenToURL(token: Token) {
}

function isImageURL(url: URL) {
return /(bmp|gif|jpeg|jpg|png|svg)$/.test(url.pathname);
return /\.(bmp|gif|jpe?g|png|svg|webp)$/.test(url.pathname);
}
1 change: 1 addition & 0 deletions resources/custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ vitejs
vitest
vizag
vsix
webp
websockets
wgutils
wincent
Expand Down

0 comments on commit 7404e8e

Please sign in to comment.