A utility function that verifies an uploaded file is an image before saving it.
3
votes

-
Steve Owen commented
If you use the API, DecodeStream and Build both throw exceptions if it's not a readable image. We trap that to detect for non-images.