Skip to content

Embed local SVG images as image/svg+xml - #2352

Open
NotAFlightRisk wants to merge 1 commit into
python-visualization:mainfrom
NotAFlightRisk:fix-svg-image-mime
Open

NotAFlightRisk wants to merge 1 commit into
python-visualization:mainfrom
NotAFlightRisk:fix-svg-image-mime

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

This embeds local .svg files as image/svg+xml, so an SVG actually shows up when you use it for a CustomIcon or ImageOverlay. At the moment it goes in as data:image/svg;base64,..., which isn't a registered type, and Chromium won't draw it. On 1.0.0 a 40x30 SVG marker and overlay both come out blank (0x0), and they're 40x30 with this change.

Other extensions are left as they are. PNG and JPEG get away with the bare extension because Chromium sniffs raster image bytes (even image/jpg renders), but it doesn't do that for SVG.

This branch was successfully deployed

1 active deployment
pypi — 90a21af1 Deployed Nov 16, 2026 by NotAFlightRisk via packages #2099
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.

1 participant