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

chore(gatsby-remark-images): Only convert supported image extensions #32868

Merged
merged 3 commits into from
Aug 24, 2021

Conversation

Mike-Dax
Copy link
Contributor

Description

gatsby-remark-images will incorrectly attempt to convert videos and other files, only disallowing gifs and svgs. This PR adds an explicit allow list instead.

This helps it play nicer with plugins such as gatsby-remark-videos.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 22, 2021
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 for the PR!

Can you please also add tests for this to https://github.com/Mike-Dax/gatsby/blob/only-convert-images/packages/gatsby-remark-images/src/__tests__/index.js to check the correct behavior?

Let me know if you need any help

packages/gatsby-remark-images/src/index.js Show resolved Hide resolved
@LekoArts LekoArts added topic: remark/mdx Related to Markdown, remark & MDX ecosystem and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 23, 2021
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 63eaabf into gatsbyjs:master Aug 24, 2021
@Mike-Dax Mike-Dax deleted the only-convert-images branch August 24, 2021 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: remark/mdx Related to Markdown, remark & MDX ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants