Is it possible to achieve a consistent display of images with a fixed size in PHP without altering their proportions?

When displaying images with a fixed size in PHP, it is common for the images to be distorted if their proportions are not maintained. To achieve a consistent display without altering the proportions, you can use the CSS property "object-fit: cover;" to ensure the image fills the fixed-size container while maintaining its aspect ratio.

<?php
echo '<img src="image.jpg" style="width: 200px; height: 200px; object-fit: cover;" />';
?>