sample image preview in php
using gd library

$full_path = 'zip://' . $zip_file_path . '#' . $image_inside_zip;
list($width, $height, $type, $attr) = getimagesize($full_path);
echo "Image width: " . $width . " pixels<br>";
echo "Image height: " . $height . " pixels<br>";
echo "Image type constant: " . $type . " (e.g., 2 for JPEG)<br>";
echo "HTML IMG tag attributes: " . $attr . "<br>";
echo '<img src="' . htmlspecialchars($filename) . '" ' . $attr . ' alt="Example Image" />';