Fine tune validation for MediaType
Catch exception if the provided media is not an Image
Merge branch 'sonata/master'