setting max widht and height for image