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

ImageConverter: Guess MIME type for "data:" URIs #10074

Closed
wants to merge 1 commit into from

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Jan 9, 2022

This is a naive (but defensive) implementation that fixes #10073.

If somebody has a better implementation, please go ahead!

Feature or Bugfix

Arguable. I'd say it's a bugfix.

Detail

I don't really know what '?' means in node['candidates'], so I can't be sure that my PR doesn't break anything.

However, unless something other than a data URI also happens to start with 'data:', I think we should be safe.

@mgeier
Copy link
Contributor Author

mgeier commented Jan 13, 2022

I've created a (most likely better) alternative in #10099.

@mgeier mgeier deleted the data-uri-mimetypes branch January 15, 2022 09:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for "data" URIs in ImageConverter.guess_mimetypes()
1 participant