-
Notifications
You must be signed in to change notification settings - Fork 11k
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
image/svg
MIME breaks browser rendering of SVG files
#30967
Comments
Reverting that PR won't fix your issue? |
Hi @GrahamCampbell , I just did a quick debug.. Sorry, my mistake... Apparently, my issue did not get resolved when I reverted the PR. Maybe this issue is not directly related with the PR.. can you help identify? Cheers! |
Hi there, Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels: However, this issue will not be locked and everyone is still free to discuss solutions to your problem! Thanks. |
Hi @PhoenixPeca, |
Description:
Hi, I believe there's an issue with PR #30204Apparently, browsers need the svg files to have the
Content-Type: image/svg+xml
to render them.Browsers does not render the "svg" images when we set the
Content-Type: image/svg
in source links of<img src="...">
and cssurl('...')
as shown in the image:Opening the file directly downloads it immediately.
Steps To Reproduce:
As mentioned in your description, this MIME only triggers when
<?xml ... ?>
does not exist.So i end up with two choices to resolve locally:
content-type
header and replace it withContent-Type: image/svg+xml
I recommend
that this PR is reverted andset it back toimage/svg+xml
.. Afterall, SVG files are all based on xml.. I believe there's no need to differentiate.Update:
Issue may not be caused by PR #30204
The text was updated successfully, but these errors were encountered: