PHPackages                             spatie/laravel-screenshot - 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. spatie/laravel-screenshot

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

spatie/laravel-screenshot
=========================

Take screenshots of web pages in Laravel apps

1.2.0(3mo ago)8195.1k↑145.2%32MITPHPPHP ^8.3CI passing

Since Feb 12Pushed 1w agoCompare

[ Source](https://github.com/spatie/laravel-screenshot)[ Packagist](https://packagist.org/packages/spatie/laravel-screenshot)[ Docs](https://github.com/spatie/laravel-screenshot)[ RSS](/packages/spatie-laravel-screenshot/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (4)Dependencies (34)Versions (9)Used By (2)

 [   ![Logo for Laravel Screenshot](https://camo.githubusercontent.com/796b1f28b0d52d8904e445c823cb4b158cb6c4f4cc1f4ec979eea5acf5131851/68747470733a2f2f7370617469652e62652f7061636b616765732f6865616465722f6c61726176656c2d73637265656e73686f742f68746d6c2f6c696768742e776562703f313233)  ](https://spatie.be/open-source?utm_source=github&utm_medium=banner&utm_campaign=laravel-screenshot)Take screenshots of web pages in Laravel apps
=============================================

[](#take-screenshots-of-web-pages-in-laravel-apps)

[![Latest Version on Packagist](https://camo.githubusercontent.com/859cb1d15d469e3171ce3613de08f1fed82a18852d384cd1e0141dc9511c01e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d73637265656e73686f742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-screenshot)[![GitHub Tests Action Status](https://github.com/spatie/laravel-screenshot/actions/workflows/run-tests.yml/badge.svg)](https://github.com/spatie/laravel-screenshot/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/79b990fdce624c51f126606319cb48ddc86fafb59c023f4c964729199b579adc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d73637265656e73686f742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-screenshot)

This package provides a simple way to take screenshots of web pages in Laravel apps. It uses a driver-based architecture, so you can choose between [Browsershot](https://spatie.be/docs/browsershot) (Chromium) and [Cloudflare Browser Rendering](https://developers.cloudflare.com/browser-rendering/).

Screenshots are taken with beautiful defaults: 1280x800 viewport, 2x device scale factor (retina), PNG format, and waiting for network idle.

Here's a quick example:

```
use Spatie\LaravelScreenshot\Facades\Screenshot;

Screenshot::url('https://example.com')->save('screenshot.png');
```

You can customize the viewport, format, and capture options:

```
use Spatie\LaravelScreenshot\Facades\Screenshot;

Screenshot::url('https://example.com')
    ->width(1920)->height(1080)
    ->quality(80)
    ->save('screenshot.jpg');
```

You can test your screenshots too:

```
use Spatie\LaravelScreenshot\Facades\Screenshot;

it('can take a screenshot', function () {
    Screenshot::fake();

    $this->get(route('screenshot'))->assertOk();

    Screenshot::assertSaved(function ($screenshot) {
        return $screenshot->url === 'https://example.com';
    });
});
```

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/be767c260a4c8eb80167698771de5f8fd285c8ff1df9b25ce6d2d89c11148af6/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d73637265656e73686f742e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-screenshot)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Documentation
-------------

[](#documentation)

All documentation is available [on our documentation site](https://spatie.be/docs/laravel-screenshot).

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.8% 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 ~8 days

Total

5

Last Release

110d ago

Major Versions

0.0.1 → 1.0.02026-02-12

PHP version history (2 changes)0.0.1PHP ^8.4

1.1.1PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![jimirobaer](https://avatars.githubusercontent.com/u/8984769?v=4)](https://github.com/jimirobaer "jimirobaer (1 commits)")

---

Tags

automationbrowsershotcloudflarelaravelscreenshotspatielaravellaravel-screenshot

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/spatie-laravel-screenshot/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

213421.4k2](/packages/wnx-laravel-backup-restore)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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