I have an image element:
<img id="my_image" src="https://crossorigin.url/photo.jpg" onLoad=whatToPutHere() />
and after I load it from an external source (there is no CORS policy issue) I want to know the size of the image that will be the same same size in disk if I right click on the image and save it on my computer.
Can I avoid making a HEAD
request to get the Content-Length
at "https://crossorigin.url/photo.jpg"
?
Is there any other way to do it with pure javascript ?