Get Image Height and Width using PHP


A snippet to get an image height and width using PHP built-in function getimagesize  and list:

<?php

  list($width, $height) = getimagesize("myImage.png");
  echo "Image width is " . $width;
  echo "<br>";
  echo "Image height is " . $height;

?>

Happy Coding!

Related Snippets

Asha Shoukeir

About Asha shoukeir

Software Developer and System Administrator

View all posts by Asha shoukeir →