new helper function is_image to be used also during the inclusion of files in our database