Fixes issues when uploaded files aren't images.