Answer the question
In order to leave comments, you need to log in
How to get the mime type of an image from the base64 of an image?
Hello. Got a question. The external system returns images
in the format
iVBORw0KGgoAAAANSUhEUgA
AAAoAAAAKCAYAAACNMs + 9AAAABmJLR0QA / wD / AP + gvaeTAAAAB3RJ
TUUH1ggDCwMADQ4NnwAAAFVJREFUGJWNkMEJADEIBEcbSDkXUnfSg
nBVeZ8LSAjiwjyEQXSFEIcHGP9oAi + H0Bymgx9MhxbFdZE2a0s9kT
Zdw01ZhhYkABSwgmf1Z6r1SNyfFf4BZ + ZUExcNUQUAAAAASUVORK5
CYII =
Answer the question
In order to leave comments, you need to log in
Substitute mime from any supported image format. The browser will still display the image correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question