making image center and auto