Json and images
3 answers
Kevin already provided a solution for static images, but if you want to pass dynamically generated images you can use the same method with the data url.
You will need to encode your image in Base64 (on the server) and then on the client you just need to create
<img src="data:image/png;base64,the_base64_string_here">
on the client (if using HTML5) or
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:@"data:image/png;base64,the_base64_string_here"]]
(when writing your own code).
+2
a source to share