Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): Add AVIF file support to image loader in webpack config #28638

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

gugu
Copy link
Contributor

@gugu gugu commented Dec 15, 2020

Description:

Currently, gatsby allows to include as images supported image types (for example, jpeg, gif, webp). Most browsers recently added AVIF image support, but gatsby does not recognize AVIF as images and tries to include AVIF file in the bundle

Expected behavior:

<img src="file.avif"> should create avif file in the folder with output and generate <img src="path-to-file.avif"> in the resulting HTML file

Current behavior:

Gatsby tries to include the file (which is of binary format) in the bundle and crashes doing that

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 15, 2020
@LekoArts LekoArts added status: awaiting author response Additional information has been requested from the author and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 16, 2020
@LekoArts
Copy link
Contributor

Please provide a filled out PR template, an empty description will only eventually result in a closed PR as we don't know why you opened it.

Please explain why you opened it, what it should achieve, what the risks are and what underlying problem you have.

@gugu
Copy link
Contributor Author

gugu commented Dec 16, 2020

@LekoArts yes, you're right, I've added description

@LekoArts LekoArts added topic: webpack/babel Webpack or babel and removed status: awaiting author response Additional information has been requested from the author labels Dec 16, 2020
@wardpeet wardpeet changed the title Add AVIF file support to image loader in webpack config feat(gatsby): Add AVIF file support to image loader in webpack config Dec 16, 2020
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LekoArts LekoArts merged commit 1a59200 into gatsbyjs:master Dec 16, 2020
@gugu gugu deleted the patch-1 branch December 16, 2020 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants