If you have a SQL database that has an image field in a particular table and want to return the image to the web site using web API’s then you almost have to extract the image as binary, read it to a memory stream and then save it temporarily on the server. Pass the location back to the web page where the web page then displays the image.
What if you don’t want to create a temporary file or what if you have a lot of images for a particular product you know the user is not going to look at all of them, but since they could you’re left to run through this process anyway. Here is another way you could do this. Instead of creating a temporary file just stream the image back in the way of a string. Then let your browser convert it to the binary image equivalent. Learn More