Skip to content

Add support for image/svg+xml - #143

Open
blmarket wants to merge 2 commits into
RafidMuhymin:mainfrom
blmarket:svg+xml
Open

Add support for image/svg+xml#143
blmarket wants to merge 2 commits into
RafidMuhymin:mainfrom
blmarket:svg+xml

Conversation

@blmarket

@blmarket blmarket commented Dec 15, 2022

Copy link
Copy Markdown

This change allows SVG images can be processed by astro-imagetools. (e.g. converting svg into webp etc)

As the file-type library parse the SVG image as 'xml' extension, we should add xml to supportedImageTypes.

This change allows SVG images can be processed by astro-imagetools. (e.g. converting svg into webp etc)
As the `file-type` library parse the SVG image as 'xml' extension, we should add `xml` to supportedImageTypes.
@vercel

vercel Bot commented Dec 15, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
astro-imagetools-demo ⬜️ Ignored (Inspect) Dec 23, 2022 at 9:31PM (UTC)
astro-imagetools-docs ⬜️ Ignored (Inspect) Dec 23, 2022 at 9:31PM (UTC)

@stephanbogner

Copy link
Copy Markdown

FWIW: My workaround currently is to not process SVG files because in most cases they are smaller in file size than pixel-based image files. But having an option to optimize them using SVGO would be rad.

@RafidMuhymin

Copy link
Copy Markdown
Owner

Nice contribution @blmarket, definitely a great addition ! But I agree with @stephanbogner. @blmarket what do you think? Could you please update the PR? I'll be glad to work on this together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants