<?php list($width, $height, $type, $attr) = getimagesize("test/test.jpg"); echo "<img src=\"test/test.jpg\" $attr alt=\"getimagesize() example\" />"; ?>