Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

0.9.2 2015-08-18 12:38 UTC

This package is auto-updated.

Last update: 2022-08-08 17:38:14 UTC


FastImage finds the dimensions or filetype of a remote image file given its uri by fetching as little as needed, based on the excellent Ruby implementation by Stephen Sykes.

This version was forked from Tom Moor PHP port, and introduced a few changes:

  • usage of exceptions
  • ability to customize HTTP headers
  • namespaced, composer-ready


require 'Fastimage.php';
$uri = "";
// loading by creating an instance and use the 'load' method
$image = new FastImage();
$type = $image->getType();
echo "filetype: " . $type;



FastImage is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with the software. More Information