PHPackages                             kjung/webkit2png-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kjung/webkit2png-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kjung/webkit2png-php
====================

PHP wrapper for the webkit2png binary on OS X.

5805PHP

Since Sep 23Pushed 12y ago1 watchersCompare

[ Source](https://github.com/kjunggithub/webkit2png-php)[ Packagist](https://packagist.org/packages/kjung/webkit2png-php)[ RSS](/packages/kjung-webkit2png-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

webkit2png-php
==============

[](#webkit2png-php)

webkit2png-php is a PHP wrapper for the [webkit2png binary](https://github.com/paulhammond/webkit2png/) available on Mac OS X. Latest webkit2png version tested with this library is `v0.6`. For more details on webkit2png, please refer to the [webkit2png project](http://www.paulhammond.org/webkit2png/) page.

Requirements
------------

[](#requirements)

- [webkit2png binary](https://github.com/paulhammond/webkit2png/)
- PHP 5.3 or greater
- Shell access

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

[](#installation)

To get started, require the library in your `composer.json` file:

```
{
	"require": {
		"kjung/webkit2png-php": "1.0.*@dev"
	}
}
```

Then run `composer install` or `composer update`.

Usage
-----

[](#usage)

- Start by loading the autoloader:

```
require_once 'vendor/autoload.php';
```

- Instantiate the library with the URL:

```
$webkit2png = new \kjung\webkit2png('http://google.com');
```

- You can pass options to it but it is not required:

```
$webkit2png->setOptions(array(
	'dir'      => 'screenshots/',
	'width'    => 1000,
	'fullsize' => true
	)
);
```

The library default directory is set to `images/` but you can always override it with the `dir` option as seen above.

- Now Generate the image:

```
$webkit2png->getImage();
```

And thats it!

- Optionally, you can access the actual webkit2png query being sent with this method:

```
$webkit2png->getQuery();
```

Available Options
-----------------

[](#available-options)

OptionExamplewidth`1280`height`800`zoom`2.0`fullsize`true`thumb`true`clipped`true`clipped-width`1000`clipped-height`800`scale`3.0`dir`'images/'`filename`'image'`md5`true`datestamp`true`delay`3`js`'\'javascript string here\''`no-image`true`no-js`true`transparent`true`user-agent`'\'user agent string here\''`Keep in mind that for `js` and `user-agent`, you must either use double quotes or escape single quotes so that the string passed is wrapped by quotes.

TODOs
-----

[](#todos)

- Add validation
- Complete Readme
- Composer

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/c143efd87ecd271dbb807be9c1fc97868778504cdbd55ec692dd0374552b5e88?d=identicon)[kjunggithub](/maintainers/kjunggithub)

### Embed Badge

![Health badge](/badges/kjung-webkit2png-php/health.svg)

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

###  Alternatives

[beyondcode/laravel-comments

Add comments to your Laravel application

605414.2k2](/packages/beyondcode-laravel-comments)[graphp/graph

GraPHP is the mathematical graph/network library written in PHP.

711292.6k3](/packages/graphp-graph)[kucrut/vite-for-wp

Vite integration for WordPress plugins and themes development.

321127.6k6](/packages/kucrut-vite-for-wp)[cijic/phpmorphy

phpMorphy - morphological analyzer library for Russian, English, German and Ukrainian languages.

115339.9k7](/packages/cijic-phpmorphy)[alrik11es/cowsayphp

Cowsay port in PHP

72516.3k1](/packages/alrik11es-cowsayphp)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)

PHPackages © 2026

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