Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting generated image to show on site

I use this link http://weather.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-E%20HURRICANE&lat=14.6&lon=-90.5&zoom=1&info=vis to generate an image, but cannot add that url to an tag how can I get the generated jpg image to include in my site ?

Thanks

like image 297
neavilag Avatar asked Dec 07 '25 12:12

neavilag


1 Answers

The response of that URL, is an HTML file, and text/html is the Internet Media Type of it, so it can't be used directly inside an <img /> tag.

This means that either you should include it as an iframe in your site (see this fiddle), or you should parse the response and find the true URL of the image, and use that URL as the source of an <img /> tag.

like image 165
Saeed Neamati Avatar answered Dec 09 '25 01:12

Saeed Neamati



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!