PHPackages                             actengage/capture - 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. actengage/capture

ActiveLibrary

actengage/capture
=================

The official SDK for Capture.

v0.9.2(3y ago)0516MITPHPPHP ^8.1

Since Jun 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ActiveEngagement/capture-sdk)[ Packagist](https://packagist.org/packages/actengage/capture)[ RSS](/packages/actengage-capture/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Capture SDK
===========

[](#capture-sdk)

This package provides fluent SDK for the Capture server. Capture is a Node server on AWS that takes screenshots with a variety of options. This package requires access to a Capture server endpoint before it be used.

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

[](#requirements)

- Laravel ^9.1
- PHP ^8.1
- Guzzle ^7.0
- Capture Server Endpoint

Capture Server
--------------

[](#capture-server)

Why is the Capture server endpoint not included in the package? Capture is a private Node server that runs Puppeteer with a specific set of features that are used for our internal products. We do not publish the URL, as its not intended for public consumption. You may however deploy your own Capture server and endpoint.

[Capture Server](https://github.com/ActiveEngagement/capture)

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

[](#installation)

*Install via Composer*

```
composer require actengage/capture-sdk
```

*Publish the config file*

```
php artisan vendor:publish --tag=capture-config
```

*Set the endpoint URL in your ENV file.*

```
CAPTURE_ENDPOINT=http://localhost:3000/
```

Basic Usage
-----------

[](#basic-usage)

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')->request();
```

### Calls

[](#calls)

Call allow you to execute methods on the Puppeteer `page` instance before the screenshot has been taken. This is a convenient way to execute a sequence of actions that are explicitly built into the server options (mainly for edge cases). The first argument is the method name, and all other arguments are passed to the method in Puppeteer.

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->call('$', 'header#nav > .logo')
    ->request();
```

### Clipping

[](#clipping)

Clip a portion of an image using `width`, `height`, `x`, and `y` coordinates. There is no clipping by default.

```
use Actengage\Capture\DataTypes\Clip;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->clip(new Clip(800, 600, 400, 300))
    ->request();
```

### Encoding

[](#encoding)

Encoding changes how the response is composed, either using `binary` or `base64`. Defaults to `binary`.

```
use Actengage\Capture\DataTypes\Encoding;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->encoding(Encoding::Binary)
    ->request();
```

### Full Page

[](#full-page)

Take full page screenshots. Defaults to `false`.

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->fullPage(true)
    ->request();
```

### Headers

[](#headers)

Pass a custom headers that are included by Puppeteer in its HTTP request. Defaults to `{"Accept-Language": "en-US"}`.

```
use Actengage\Capture\DataTypes\Encoding;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->header('Accept-Language', 'en-US')
    ->request();
```

### Omit Background

[](#omit-background)

This omits the black background for transparent PNG images. Defaults to `true`.

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->omitBackground(true)
    ->request();
```

### Quality

[](#quality)

The quality of image that is returned. Must be `1-100`. Defaults to `100`.

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->quality(100)
    ->request();
```

### Timeout

[](#timeout)

The timeout of the Puppeteer request (in milliseconds). Defaults to `25000`.

```
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->timeout(15000)
    ->request();
```

### Type

[](#type)

The type of image that is returned, `jpeg` or `png`. Defaults to `jpeg`.

```
use Actengage\Capture\DataTypes\Type;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->type(Type::PNG)
    ->request();
```

### Viewport

[](#viewport)

The viewport dimensions. Defaults to `{"width": 1200, "height": 800}`.

```
use Actengage\Capture\DataTypes\Viewport;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->viewport(new Viewport(1200, 800))
    ->request();
```

### Wait Until

[](#wait-until)

How long should Puppeteer wait before returning a response. Defaults to `['load', 'networkidle2']`.

```
use Actengage\Capture\DataTypes\WaitUntil;
use Actengage\Capture\Facades\Screenshot;

$response = Screenshot::make('https://google.com')
    ->waitUntil([WaitUntil::Load, WaitUntil::NetworkIdle2])
    ->request();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~13 days

Total

3

Last Release

1411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3751e573441701b44fab996c721a3249349c97f023d99986c2f6d646947727e5?d=identicon)[actengage](/maintainers/actengage)

---

Top Contributors

[![actengage](https://avatars.githubusercontent.com/u/33735047?v=4)](https://github.com/actengage "actengage (7 commits)")

---

Tags

laravelscreenshotpuppeteercapture

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

14250.4k](/packages/urlbox-screenshots)

PHPackages © 2026

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