When setting width and height with CSS (width:100%; height:100%), the image tends to get stretched, leading to an unattractive appearance. How can images be filled without stretching them? Additionally, how can they be centered both vertically and horizontally?