OK. I have a basic MVC5 web app. I store images as binary in SQL DB. All good so far.
I can upload different image types: png, jpg, gif ...
My question when I read the image (binary from db) and show it, how can I dynamically format the data:image/gif;base64,XXXXXXXXXXXXXXXXXXXXXXXXX ?
More exactly, how can I get the it's type, image/gif or image/png or image/jpg ... from that binary image?