Is there a way to show bitmap image data in an HTML element?
For example, you have a regular image that points to a source file like this:
<img src="myImage.png" width="100" height="100" />
Is there something like this:
<img width="100" height="100">
<data>ABCDEF...</data>
</img>
Where data would be bitmap data or something similar? And if possible if you know if it's recommended or supported in major browsers?
You could use a data URI:
<img src="data:image/bmp,ABCDEF..." width="100" height="100" />
If you encoded the data in base64, it could look like this:
<img src="data:image/bmp;base64,BASE64DATAGOESHERE..." width="100" height="100" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With