How can PHP developers work around the server configuration restriction to access image dimensions via URL?

Some server configurations restrict access to image dimensions via URL due to security concerns. PHP developers can work around this restriction by using the `getimagesize()` function to retrieve the dimensions of an image file stored on the server. This function can be used to get the width and height of an image without needing direct access to the file via URL.

$image_path = 'path/to/image.jpg';
$image_size = getimagesize($image_path);
$width = $image_size[0];
$height = $image_size[1];

echo "Image width: $width<br>";
echo "Image height: $height";