Skip to content

feat(gatsby-transformer-sharp): Add avif to supportedExtensions #37112

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

Merged
merged 2 commits into from
Nov 29, 2022

Conversation

heimoshuiyu
Copy link
Contributor

Description

Problem

Build my mdx website with gatsby-plugin-mdx and gatsby-remark-images, avif image not show.

my gatsby-config.js

{
resolve: `gatsby-plugin-mdx`,
  options: {
  gatsbyRemarkPlugins: [
    {
      resolve: `gatsby-remark-images`,
      options: {
        maxWidth: 1200,
      },
    },
  ],
},

Solution

In document it say gatsby support avif out-of-the-box. So I tried to add avif to the supportedExtensions and it works well.

What's more I noticed the README.md said it only support jpeg and png, but in fact gatsby-plugin-mdx (or gatsby-remark-images) can support webp and tiff out of box.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 28, 2022
@LekoArts LekoArts changed the title feat(gatsby-remark-images): support avif and update document feat(gatsby-transformer-sharp): Add avif to supportedExtensions Nov 29, 2022
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! This works because https://sharp.pixelplumbing.com/#formats added AVIF support in the meantime. The information there is what decides what we can use for supportedExtensions

@LekoArts LekoArts added topic: media Related to gatsby-plugin-image, or general image/media processing topics and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 29, 2022
@LekoArts LekoArts merged commit fbb3a3c into gatsbyjs:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy