Web server generates images and sends them to client directly. There are no URLs to the images, for security reasons. For example, if I enter /images/25
URL in the browser server will send it and browser will download it.
Now I want to get this image from Ajax call and then display it on existing page. I can get the image data. My question is: how can I display an image?
$.get(/images/25, function (rawImageData) {
// ??? Need to add an image to DOM
});
Update
I apologize for being so stupid. Thank you, JW. Of course I can just put img tag with src to my URL. It does not matter if this is a direct URL to an image file or the server sends it dynamically.