Allow SVGs when using Assets#7643
Merged
Princesseuh merged 5 commits intowithastro:mainfrom Jul 13, 2023
alvinometric:main
Merged
Allow SVGs when using Assets#7643Princesseuh merged 5 commits intowithastro:mainfrom alvinometric:main
Princesseuh merged 5 commits intowithastro:mainfrom
alvinometric:main
Conversation
🦋 Changeset detectedLatest commit: 7b981dd The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Princesseuh
approved these changes
Jul 13, 2023
Member
Princesseuh
left a comment
There was a problem hiding this comment.
Awesome work, thank you very much!
Merged
borgoat
added a commit
to borgoat/astro
that referenced
this pull request
Jan 25, 2025
The Sharp service would deliberately prevent SVG images from being processed(withastro#7643). However, Sharp does support transforming SVG. Therefore, we forward the transform configuration to Sharp as-is
borgoat
added a commit
to borgoat/astro
that referenced
this pull request
Jan 25, 2025
The Sharp service would deliberately prevent SVG images from being processed(withastro#7643). However, Sharp does support transforming SVG. Therefore, we forward the transform configuration to Sharp as-is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Hello Astro team,
This an attempt to fix #7420. It now allows SVG using assets (previously it would throw an error if you used an svg in a markdown image tag, you can refer to the original issue) by not passing them to the transformer.
This would have been impossible without @Princesseuh's help, thank you so much Erika 🙏
Testing
Locally using a test project.
Docs
I updated the wording in the error message, to make it clear that not everything gets optimised. That's the part of the PR that I'm most unsure of, so any comments appreciated!