$path = "image.jpg"; $width = imagesx(imagecreatefromjpeg($path)); echo "The width of image is: " . $width . " pixels";
$path = "image.jpg"; list($width, $height) = getimagesize($path); echo "The width of image is: " . $width . " pixels";The package/library used in these examples is the GD library, which is a PHP extension that allows you to create and manipulate images.