PHPackages                             fasterimage/fasterimage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. fasterimage/fasterimage

ActiveLibrary[Image &amp; Media](/categories/media)

fasterimage/fasterimage
=======================

FasterImage finds the size or type of a set of images given their uris by fetching as little as needed, in parallel. Originally ported by Tom Moor.

v1.5.0(7y ago)611.0M—1.8%8[1 issues](https://github.com/willwashburn/FasterImage/issues)3MITPHPPHP &gt;=5.4.0CI failing

Since May 6Pushed 7y ago5 watchersCompare

[ Source](https://github.com/willwashburn/FasterImage)[ Packagist](https://packagist.org/packages/fasterimage/fasterimage)[ Docs](https://github.com/willwashburn/fasterimage)[ RSS](/packages/fasterimage-fasterimage/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (3)

FasterImage [![CircleCI](https://camo.githubusercontent.com/ef8840153f3c40c66ed3c0062b8413beae5de03b280bf8b7ce7882361e67d3b4/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f77696c6c776173686275726e2f666173746572696d6167652e7376673f7374796c653d666c61742d737175617265)](https://circleci.com/gh/willwashburn/fasterimage) [![Coveralls](https://camo.githubusercontent.com/48e79740dd97d8b38f2d6969f9c513c0ba32cb5806b1b6665141923574b88c5c/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f77696c6c776173686275726e2f666173746572696d6167652e7376673f6d61784167653d323539323030267374796c653d666c61742d737175617265)](https://coveralls.io/github/willwashburn/fasterimage) [![Minimum PHP Version](https://camo.githubusercontent.com/b52c83f3d45755ebcb1e6863ebb202ab192aaf773424369ffdeedae107f027ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e342d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/) [![Packagist Version](https://camo.githubusercontent.com/343d494cc26d3b1d03ad3e5afc8d04269fec169dd33fecd7028ac8c337e94fe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666173746572696d6167652f666173746572696d6167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fasterimage/fasterimage) [![Packagist Downloads](https://camo.githubusercontent.com/7f67b308a6b4a0eafa3514be912081ddb65e038e9395b73b81be30257eddc25f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666173746572696d6167652f666173746572696d6167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fasterimage/fasterimage/stats) [![License](https://camo.githubusercontent.com/0d78b22864addfd9b16b77816a00848bf0a5a8a140537bbc7e554c6eceb48114/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666173746572696d6167652f666173746572696d6167652e7376673f7374796c653d666c61742d737175617265)](https://github.com/willwashburn/fasterimage/LICENSE)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#fasterimage------)

FasterImage 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](https://github.com/sdsykes/fastimage) and [PHP implementation by Tom Moor](https://github.com/tommoor/fastimage).

FasterImage uses the curl\_muli\* suite to run requests in parallel. Currently supports JPG, GIF, PNG, WEBP, BMP, PSD, TIFF, SVG, and ICO files.

Usage
-----

[](#usage)

```
        $client = new \FasterImage\FasterImage();

        $images = $client->batch([
            'http://wwww.example.com/image1.jpg',
            'http://wwww.example.com/image2.gif',
            'http://wwww.example.com/image3.png',
            'http://wwww.example.com/image4.bmp',
            'http://wwww.example.com/image5.tiff',
            'http://wwww.example.com/image6.psd',
            'http://wwww.example.com/image7.webp',
            'http://wwww.example.com/image8.ico',
            'http://wwww.example.com/image9.cur',
            'http://wwww.example.com/image10.svg'
        ]);

        foreach ($images as $image) {
            list($width,$height) = $image['size'];
        }
```

Install
-------

[](#install)

`composer require fasterimage/fasterimage`

Alternatively, add `"fasterimage/fasterimage": "~1.5"` to your composer.json

Changelog
---------

[](#changelog)

- v1.5.0 - Fallback support when curl\_multi\_init() is not available
- v1.4.0 - Add support for parsing dimensions from SVG images
- v1.3.0 - Add ability for user agent, buffer size, and SSL host/peer verification to be overridden
- v1.2.1 - Limit isRotated to only check for valid orientation values
- v1.2.0 - Add option to include content-length in result set
- v1.1.2 - Update Accept header to accept images
- v1.1.1 - Properly handle jpeg's with corrupted Exif tags
- v1.1.0 - Return message in return array when curl fails
- v1.0.3 - Use external stream package
- v1.0.2 - Fail invalid image exceptions gracefully when using batch requests
- v1.0.1 - Support PHP v5.4+
- v1.0.0 - **Stable Release** - Support for `.PSD`, `.ICO` + `.CUR`
- v0.0.7 - Remove support for PHP v5.4
- v0.0.6 - Add option to set timeout of requests, support for EXIF in .jpgs, better support for .bmp (including negative height bitmaps) and normalized response indexes for all file types
- v0.0.5 - Support for `.webp`
- v0.0.4 - Support for `.tiff` and exceptions for unknown file types
- v0.0.3 - Force curl to follow redirects so you get less bad responses
- v0.0.2 - Update curl headers to mimic browser so you get less bad responses
- v0.0.1 - Support for `.jpg`, `.bmp`, `.gif`, `.png` and parallel requests

References
----------

[](#references)

-
-
-
-
-
-

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~87 days

Recently: every ~111 days

Total

18

Last Release

2572d ago

Major Versions

0.0.7 → 1.0.02015-05-16

PHP version history (3 changes)0.0.1PHP &gt;=5.3.0

0.0.7PHP &gt;=5.5.0

1.0.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/957608?v=4)[Will Washburn](/maintainers/willwashburn)[@willwashburn](https://github.com/willwashburn)

---

Top Contributors

[![willwashburn](https://avatars.githubusercontent.com/u/957608?v=4)](https://github.com/willwashburn "willwashburn (80 commits)")[![westonruter](https://avatars.githubusercontent.com/u/134745?v=4)](https://github.com/westonruter "westonruter (3 commits)")[![bluehaoran](https://avatars.githubusercontent.com/u/3521663?v=4)](https://github.com/bluehaoran "bluehaoran (1 commits)")[![daneren2005](https://avatars.githubusercontent.com/u/414653?v=4)](https://github.com/daneren2005 "daneren2005 (1 commits)")

---

Tags

imageimage-analysisimage-sizephpsizeparallelfastimageimage sizegetimagesizefast imagefaster imagefasterimage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fasterimage-fasterimage/health.svg)

```
[![Health](https://phpackages.com/badges/fasterimage-fasterimage/health.svg)](https://phpackages.com/packages/fasterimage-fasterimage)
```

###  Alternatives

[marc1706/fast-image-size

fast-image-size is a PHP library that does almost everything PHP's getimagesize() does but without the large overhead of downloading the complete file.

959.5M23](/packages/marc1706-fast-image-size)[goat1000/svggraph

Generates SVG graphs

132890.0k3](/packages/goat1000-svggraph)[jdenticon/jdenticon

Render PNG and SVG identicons.

62413.4k6](/packages/jdenticon-jdenticon)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
