PHPackages                             codegyre/phantomshot - 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. codegyre/phantomshot

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

codegyre/phantomshot
====================

PHP tool to make web-shots using PhantomJS

247032JavaScript

Since Jan 22Pushed 12y ago3 watchersCompare

[ Source](https://github.com/Codegyre/phantomshot)[ Packagist](https://packagist.org/packages/codegyre/phantomshot)[ RSS](/packages/codegyre-phantomshot/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

PhantomShot
===========

[](#phantomshot)

PHP tool to make web-shots using PhantomJS

Installation
------------

[](#installation)

### add composer requirements

[](#add-composer-requirements)

```
"require": {
    "codegyre/phantomshot": "dev-master"
}

```

### add post-install and post-update hooks to your composer.json

[](#add-post-install-and-post-update-hooks-to-your-composerjson)

```
"scripts": {
    "post-install-cmd": [
        "Codegyre\\PhantomShot\\ComposerHook::hook"
    ],
    "post-update-cmd": [
        "Codegyre\\PhantomShot\\ComposerHook::hook"
    ]
}

```

We need this to install required dependencies through npm.

Making webshot
--------------

[](#making-webshot)

```
$webPage = new \Codegyre\PhantomShot\WebPage('http://github.com');
$webPage->getShot('/tmp/github.png');

```

Thumbnailing
------------

[](#thumbnailing)

```
$tc = new \Codegyre\PhantomShot\ThumbnailCollector('http://github.com');
$tc->createThumbnail('/destination/dir/1.png', 200, 400, ThumbnailCollector::TRANSFORM_FILL_HEIGHT_MIDDLE);
$tc->createThumbnail('/destination/dir/1.png', 350, 160, ThumbnailCollector::TRANSFORM_FILL_WIDTH_MIDDLE);

```

Make sure you have npm installed on your system

Using as service
----------------

[](#using-as-service)

You have a possibility to use phantomshot as a web service to get website screenshots

```
cd src/js && ./phantomshot-service.js --port=3000

```

It will start http server on localhost:3000. Usage:

```
http://localhost:3000/?width=1024&height=768&url=http://example.com

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.2% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/228193?v=4)[Nick Palamarchuk](/maintainers/lividgreen)[@lividgreen](https://github.com/lividgreen)

---

Top Contributors

[![lividgreen](https://avatars.githubusercontent.com/u/228193?v=4)](https://github.com/lividgreen "lividgreen (25 commits)")[![bebraw](https://avatars.githubusercontent.com/u/166921?v=4)](https://github.com/bebraw "bebraw (3 commits)")[![christiaan](https://avatars.githubusercontent.com/u/118490?v=4)](https://github.com/christiaan "christiaan (1 commits)")

### Embed Badge

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

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

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

16653.6k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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