check image extension if not content type provided