fixed errors for image generating and image resizing

added image to the user