P urlimage

URLImage tried to get the image type (gif, jpg, png) from the parameter fileURL.
That's a problem if the fileURL has no extension. Code tries to default to jpg.
Yet if the real image is not a jpg, the JPEG library reads the initial marker and if it diffs, returns error.

Case: if the image is a shortURL.
Case: if the image is in a AWS or GoogleCloudStorage bucket.

Fix: get the Content-Type from the response to the fileURL request.