I'd like to use image/*
MIME type in data URI e.g. data:image/*;base64,R0lGODlhE...
in <img/>
element.
- Is it standard-compliant MIME type at all?
- Can it cause problems in some browsers and if so, in which?
I'd like to use image/*
MIME type in data URI e.g. data:image/*;base64,R0lGODlhE...
in <img/>
element.
Copyright © 2021 Jogjafile Inc.
image/*
isn't an official MIME type (though browsers may be smart enough to render it).According to RFC 2046 (Section 4.2) there are two ways you can handle generic / unknown images:
That being said, you could pass the most generic (and official) MIME type which is
application/octet-stream
or you could useimage/image
. Any browser should be able to figure out the image type, but I don't know for sure. From what I've seen, browsers have no issue forjpg
,gif
,png
- but I can't say what the case is for the many other file types.