I am using wideimage to manage images uploaded to my application. However, currently I do no validity checking on the documents so the application always assumes what gets uploaded is a valid image document. How can I use wideimage to check if the file is actually an image and not word document renamed to .jpg for example. I have checked the wideimage docs but couldnt find anything.. my detective skills are lacking somewhat so maybe thats why...
Here is the code I use with WideImage:
$image = \WideImage::loadFromFile($new_file);
$splash = $image->resize('600', '600', 'outside');
$splash->saveToFile($dir . '/' . $media_id . '.logo.jpg');