SVG files render as images in the Code tab instead of showing XML source #199435
Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
Body
Description:
When opening an SVG file on GitHub and selecting the "Code" tab, GitHub still renders the SVG as an image preview instead of showing the raw XML/source syntax.
Expected behavior:
The "Code" tab should show the SVG file as source code/XML text, with syntax highlighting or at least plain text.
Actual behavior:
The "Code" tab displays the SVG visually as an image, making it impossible or unnecessarily difficult to inspect the SVG XML from that view.
Steps to reproduce:
Impact:
This breaks the expected distinction between preview/rendered view and source/code view. For SVG specifically this is annoying because SVG is both an image format and XML source code, and the Code tab should let users inspect the underlying markup.
Beta Was this translation helpful? Give feedback.
All reactions