defined view function of image controller