Skip to content

Commit fbb3a3c

Browse files
authored
feat(gatsby-transformer-sharp): Add avif to supportedExtensions (#37112)
1 parent c98d947 commit fbb3a3c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

packages/gatsby-remark-images/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ This plugin will support the following formats:
9797

9898
- JPEG
9999
- PNG
100+
- WEBP
101+
- TIFF
102+
- AVIF
100103

101104
Since [Sharp][5] is used for image processing, this plugin will not support GIFs or SVGs. If you would like to render these file types with the image markdown syntax, use the [`gatsby-remark-copy-linked-files`](https://www.gatsbyjs.com/plugins/gatsby-remark-copy-linked-files/) plugin. Do note with this it will load in the images, but won't use the features of [Sharp][5] such as the elastic container or the blur-up enhancements.
102105

packages/gatsby-remark-images/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const supportedExtensions = {
2525
webp: true,
2626
tif: true,
2727
tiff: true,
28+
avif: true,
2829
}
2930

3031
// If the image is relative (not hosted elsewhere)

packages/gatsby-transformer-sharp/src/supported-extensions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const supportedExtensions = {
55
webp: true,
66
tif: true,
77
tiff: true,
8+
avif: true,
89
}
910

1011
module.exports = {

0 commit comments

Comments
 (0)