Is it possible to get image type (gif, png, jpeg, etc.) using src, like this?
<img src="http://d1aviatl7dpuhg.cloudfront.net/image/url/64/aHR0cDovL3BpeGNtc2FkbWluLnBpeGFibGUuY29tL3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDE1LzA3L3NoYXJrLmpwZw==">
or created by the constructor new Image().
We did not find anything useful in the W3 specifications.
I assume that a separate “XHR get src” is a kind of solution, but maybe there is a better way?
Update: all kinds of XRH do not work due to CORS, so ajax will not work here.
source
share