I am trying to write a function to read image physical size and mime type (thereafter producing a picture element) using cURL rather than the slower getimagesize().