Skip to content

Conversation

@leungkkf
Copy link

@leungkkf leungkkf commented Nov 25, 2025

I am having an issue loading this image "https://stacks.stanford.edu/image/iiif/wy534zh7137/SULAIR_rosette/full/400,/0/default.jpg". It has a mime type of "image/jpeg; charset=utf-8", which is not common.

The code doesn't parse the full string that includes the optional parameter "charset=utf-8" to create the jpeg image format.

A line is added to take only the mime type in the media type before the ";" and ignore the optional parameters.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Preview available at https://egui-pr-preview.github.io/pr/7739-fix-media-type-optional-parameters
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

Copy link
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@leungkkf leungkkf marked this pull request as ready for review November 25, 2025 13:19
@leungkkf
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot load an image with mime type "image/jpeg; charset=utf-8"

2 participants