PHPackages                             hotrush/webshotter - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. hotrush/webshotter

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

hotrush/webshotter
==================

Make screnshots of webpages with phantomjs

0.1.7(8y ago)106301[2 issues](https://github.com/hotrush/Webshotter/issues)1MITPHPPHP &gt;=5.4.0

Since Jan 5Pushed 8y ago2 watchersCompare

[ Source](https://github.com/hotrush/Webshotter)[ Packagist](https://packagist.org/packages/hotrush/webshotter)[ Docs](https://github.com/hotrush/webshotter)[ RSS](/packages/hotrush-webshotter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (2)Versions (7)Used By (1)

[![Build Status](https://camo.githubusercontent.com/626b4cf536e5c0d8128abb23241fa9964c3a243e947ff817b54478d2ec699ac0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f686f74727573682f57656273686f747465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/hotrush/Webshotter)[![Latest Version](https://camo.githubusercontent.com/634349ac62a5b7b1082534a7c44733cf3a6399b40f4fdfc1f17af5e0095ffb7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f74727573682f57656273686f747465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/hotrush/webshotter/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/3a847200b36f78fb5d3566b1a5e23920f6ac50f84d3bf29e5ae61324e9fca8a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f74727573682f77656273686f747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hotrush/webshotter)

Webshotter
==========

[](#webshotter)

Take website's screenshots with PHP/PhantomJS and save them to PNG, JPG or PDF.

Also you can take a look at simple microservice with lumen and this package - [hotrush/Webshotter-microservice](https://github.com/hotrush/Webshotter-microservice).

Changelog
---------

[](#changelog)

***0.1.6*** - added `waitForImages()` and `imagesLoadingTimeout`

***0.1.5*** - custom `$templatePath` fixed, thanks to [mizansyed](https://github.com/mizansyed)

***0.1.3*** - added `timeout` property that allow to limit page load timeout (using [onResourceTimeout](http://phantomjs.org/api/webpage/handler/on-resource-timeout.html) phantomjs feature). If timeout reached `TimeoutException` will be thrown.

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

[](#installation)

```
composer require hotrush/webshotter

```

Laravel installation
--------------------

[](#laravel-installation)

After installing package via composer add a service provider to your config/app.php

```
// app/config/app.php

'providers' => [
    ...,
    hotrush\Webshotter\WebshotServiceProvider::class
];

```

Usage
-----

[](#usage)

```
$webshot = new hotrush\Webshotter\Webshot();
$jpg = $webshot
    ->setUrl('https://github.com')
    ->setWidth(1200)
    ->setHeight(800)
    ->setTimeout(5) // set timeout in seconds, 30 seconds default
    ->setFullPage(true) // set to true to get full page screenshot (width/height will be used for viewport only)
    ->waitForImages() // wait when all images will load
    ->setImagesLoadingTimeout() // images loading timeout, will failt if not loaded
    ->saveToPng('github', $path);

```

You can use `saveToJpg`, `saveToPng` or `saveToPdf` methods. This methods requires 2 parameters: file name (without extension) and target directory to save file. They all returns full path to saved file

If you want to use you own PhantomJs executable - you can specify path to it via constructor.

```
new hotrush\Webshotter\Webshot('/path/to/phantomjs');

```

Example screenshot:

[![example](github.png)](github.png)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.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 ~144 days

Recently: every ~180 days

Total

6

Last Release

3057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cfcee390045ec2c0820506544a6778f93fed658e5e1124d38db4524aa6b3f4f?d=identicon)[hotrush](/maintainers/hotrush)

---

Top Contributors

[![hotrush](https://avatars.githubusercontent.com/u/1247004?v=4)](https://github.com/hotrush "hotrush (27 commits)")[![blacktrue](https://avatars.githubusercontent.com/u/15004512?v=4)](https://github.com/blacktrue "blacktrue (1 commits)")[![mizansyed](https://avatars.githubusercontent.com/u/600262?v=4)](https://github.com/mizansyed "mizansyed (1 commits)")

---

Tags

laravelpdfimagegdimagicklumenpngjpgwebpagescreenshotphantomjswebshot

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

14250.4k](/packages/urlbox-screenshots)[nilgems/laravel-textract

A Laravel package to extract text from files like DOC, XL, Image, Pdf and more. I've developed this package by inspiring "npm textract".

195.2k](/packages/nilgems-laravel-textract)

PHPackages © 2026

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