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

SVGs are been mimed as PNG #11

Open
tefod-zz opened this issue Jan 11, 2021 · 3 comments
Open

SVGs are been mimed as PNG #11

tefod-zz opened this issue Jan 11, 2021 · 3 comments

Comments

@tefod-zz
Copy link

Hi,
Mime-Type for SVG Images are been set to data:image/png instead of data:image/svg+xml
Fix:
In inline-images to object contentTypes following has to be added:

  • ".svg": "image/svg+xml"

btw: it would be great, if the wrapper would also consider favicons (optionally) as well.

@rabidaudio
Copy link
Owner

Hi @tefod-zz . To your point, this functionality is missing from the upstream package, which this package is simply a lightweight wrapper around.

Normally I'd suggest you open an issue with that project. However there already seems to be an open PR there to add the functionality, but the project seems to be stale. (Admittedly, this project is a bit stale too, I'm not actively using it anymore but I'll do my best to continue to maintain it.)

If you or someone else wants to fork maxogden/inline-images with a more maintained version with this feature set, I'm happy to update this plugin to use it instead.

That being said, do you get much out of inlining SVGs in this way? This plugin inlines <img> tags using data URIs. But with SVGs you could also just render the content directly into your HTML, since <svg> is a valid HTML tag. I haven't looked but I suspect there's another plugin out there which will do this for you. I'd also accept a PR that adds that functionality to this plugin.

@specious
Copy link
Contributor

specious commented Dec 1, 2021

Yep, pull request waiting: max-mapper/inline-images#4

The universe must conspire to get @maxogden to take a look.

@tefod-zz
Copy link
Author

tefod-zz commented Dec 2, 2021

Your pull request is from 2017. I think you are putting too much pressure on him 😁

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

No branches or pull requests

3 participants