Are there any PHP functions that can automatically determine the size of an image and adjust the window accordingly?

To automatically determine the size of an image and adjust the window accordingly in PHP, you can use the `getimagesize()` function to retrieve the dimensions of the image. Once you have the dimensions, you can then set the width and height attributes of the window or container element to match the image size.

<?php
$image_path = 'path/to/your/image.jpg';
list($width, $height) = getimagesize($image_path);
echo '<img src="' . $image_path . '" width="' . $width . '" height="' . $height . '">';
?>