Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Screenshot Laravel Package

spatie/laravel-screenshot

Driver-based Laravel package for taking web page screenshots with great defaults. Use Browsershot (Chromium) or Cloudflare Browser Rendering, customize viewport/format/quality, save to files, and easily fake/assert screenshots in tests.

View on GitHub
Deep Wiki
Context7

title: Configuration weight: 1

This package supports multiple screenshot drivers. You can set the default driver via the LARAVEL_SCREENSHOT_DRIVER environment variable:

LARAVEL_SCREENSHOT_DRIVER=browsershot

Or in the config file:

// config/laravel-screenshot.php

return [
    'driver' => 'browsershot', // or 'cloudflare'
    // ...
];

Switching drivers per screenshot

You can switch drivers for a specific screenshot using the driver() method:

use Spatie\LaravelScreenshot\Facades\Screenshot;

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

Using a custom driver instance

You can also pass a driver instance directly:

use Spatie\LaravelScreenshot\Drivers\BrowsershotDriver;
use Spatie\LaravelScreenshot\Facades\Screenshot;

$driver = new BrowsershotDriver([
    'chrome_path' => '/usr/bin/google-chrome',
]);

Screenshot::url('https://example.com')
    ->setDriver($driver)
    ->save('screenshot.png');
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony