Made is_image_file private and static (not really needed outside)