Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The most direct Laravel implementation is Spatie Laravel Screenshot: install it with Composer, call Screenshot::url(...)->save(...), and choose either a local Browsershot/Chrome renderer or Cloudflare Browser Rendering. The package currently requires PHP 8.4+ and Laravel 12+; verify the selected package version before deployment because compatibility changes over time.

Install the Laravel screenshot package

From your Laravel application directory, run:

composer require spatie/laravel-screenshot

The package provides a Laravel facade and a driver abstraction. Its documented defaults are a 1280×800 viewport, a 2× device scale factor, PNG output, and waiting for network idle before the image is written.

Choose where the browser runs

Local Browsershot (default)

The default driver uses Spatie Browsershot, which controls a headless Chrome or Chromium process through Puppeteer. Your server, container, or worker must therefore have the spatie/browsershot package, Node.js, and a Chrome/Chromium binary. This option keeps page rendering under your operational control and is suitable for a VM or container where those dependencies can be installed and patched.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cloudflare Browser Rendering

The Cloudflare driver calls Cloudflare’s hosted Browser Rendering API, so the Laravel host does not need Node.js or a Chrome binary. You need a Cloudflare account with Browser Rendering access, an API token with the required permission, and your account ID. Add the documented variables to .env:

#1 Best Overall
Sale
MNN 15.6" FHD 60Hz Portable Monitor USB-C HDMI IPS HDR Gaming Laptop
  • Full HD Portable Monitor - MNN 15.6inch portable laptop monitor with 1920*1080 resolution, advanced IPS glossy screen support 178° full viewing angle, it renders accurate and bright color, draws you into the video or game with lifelike colors and amazing detail.It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time.A second monitor for working from home.
  • Double Type-C Port -For Plug & Play, the MNN monitor provides 2 Full Feature Type-C ports. Only One USB Type-C Cable is required to connect to the power supply & display signal transmission. NOTE: Your device should support thunderbolt 3.0 or USB 3.1 Type C DP ALT-MODE.which supports multiple connect ways to your laptops, PC, Phones, Macbooks, PS5/PS4, Xbox, and Switch.
  • Lightweight Ultra Slim for Travel - As a portable external monitor,MNN portable laptop monitor easily accommodate to every suitcase and backpack and stress-free when you are holding it for a long time. They are truly portable computer monitors for travelers, students, gamers,engineers, and everyone.
  • Give consideration to work and games - through multiple display modes [Copy Mode/Extended Mode/Second Screen Mode/Portrait Mode], we can bring you a clear second screen in the meeting, and expand the screen anytime and anywhere to improve work efficiency and improve the quality of life. Adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights,deeper and more realistic colors, more realistic images, and amazing viewing/gaming experience.
  • Powerful Smart Cover - MNN portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection for this portable computer monitor.
LARAVEL_SCREENSHOT_DRIVER=cloudflare
CLOUDFLARE_API_TOKEN=your-api-token
CLOUDFLARE_ACCOUNT_ID=your-account-id

Hosted rendering is often easier for serverless deployments, while local rendering avoids sending page content to a third-party browser service. Check Cloudflare’s current limits and pricing before committing; those values are service-specific and can change.

Decision Browsershot Cloudflare
Browser ownership Your VM, container, or worker Cloudflare-hosted API
Laravel-server dependencies Node.js, Puppeteer integration, Chrome/Chromium No Node.js or Chrome binary
Credentials Local runtime configuration Cloudflare API token and account ID
Best fit Controlled infrastructure and private rendering Serverless or minimal-operations deployments
Current cost and limits Not stated by the package documentation Check Cloudflare’s current service terms

Capture a URL in a Laravel route or service

Import the facade and save the rendered page to a path your application can access:

<?php

namespace AppHttpControllers;

use SpatieLaravelScreenshotFacadesScreenshot;

class ScreenshotController
{
    public function store()
    {
        Screenshot::url('https://example.com')
            ->save(storage_path('app/screenshots/example.png'));

        return response()->json(['status' => 'saved']);
    }
}

Create the destination directory before writing, and ensure the PHP process has permission to write it. You can then expose a route to this controller or call the service from a job, command, or application workflow. Keep untrusted URLs out of a public endpoint unless you validate and allow-list them; a screenshot endpoint can otherwise become a server-side request forgery path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set output, viewport, and page readiness

The screenshot builder supports the options most applications need:

Rank #2
InnoView Portable Monitor, 15.6 Inch FHD 1080P HDMI USB C Second External Monitor for Laptop, Desktop, MacBook, Phones, Tablet, PS5/4, Xbox, Switch, Built-in Speaker with Protective Case
  • [Portable Monitor Laptop] InnoView laptop screen extender is no need of app and drivers! 15.6 in is a more suitable size for traveling or remote work. Suitable for traveler, student, gamer, engineer, and white-collar worker to connect HP laptop, Lenovo laptop, Dell laptop, Asus laptop, Macbook, iPhone, game console, tablet, PS, Xbox, etc. The laptop screen can expand the viewing area and be more efficient when playing games, working, meeting and studying
  • [Plug and Play] The travel monitor for laptop provides 2 full-function Type-C ports and 1 HDMI port to connect most devices. Only one USB-C cable is needed to connect the external display to computer, and it supports power pass-through reverse charging. Note: Your device should support Thunderbolt 3.0/4.0 or USB 3.1 Type-C DP ALT-MODE. If not, you can connect via HDMI and power cable(NOT INCLUDE IN THE PACKAGE)
  • [IPS FHD USB C Monitor] 15.6 inch portable screen with a resolution of 1920*1080P, made of A+ IPS screen, supports 178° full viewing angle, can present accurate and vivid colors. Combined with HDR, images and videos present realistic colors and amazing details. Low blue light can effectively reduce blue light radiation damage, no flicker, eye protection, making it easier for you to work and perform multiple tasks at the same time
  • [Versatile Cover and Stand] Equipped with a scratch-resistant smart protective cover made of durable PU leather, it can also be used as a stand when working. Two grooves are used to adjust the angle and fix the external monitor. It can also provide all-round protection for the 1080p monitor when going out or traveling, suitable for putting in a backpack to avoid squeezing. Optional landscape and portrait modes, save more desktop space
  • [Worry-free Purchase] Since the output power of each device is different, the screen may flicker or restart. You can power the laptop monitor to solve it. Provide a 30-day return policy and 18-month warranty (excluding external force damage). If you have any concerns, please let us know (displayed on the back of the monitor)
  • Viewport: set width and height to match the layout you are documenting.
  • Output type: choose PNG, JPEG, or WebP. JPEG and WebP support a quality value.
  • Full page: capture the complete document rather than only the initial viewport.
  • Selector: capture one CSS-selected element, useful for a card, chart, or component preview.
  • Clip: capture explicit x/y coordinates and dimensions.
  • Device scale factor: increase or reduce pixel density; the default is 2×.
  • Transparent background: useful when the page or selected element is composited elsewhere.
  • Waiting: use a delay, a selector condition, or a network-idle condition for JavaScript-rendered content.

Exact fluent method names can vary with the package version, so check the installed version’s configuration reference and IDE completion. A representative chain is:

Screenshot::url('https://example.com/dashboard')
    ->width(1440)
    ->height(900)
    ->fullPage()
    ->type('webp')
    ->quality(82)
    ->waitForSelector('.dashboard-ready')
    ->save(storage_path('app/screenshots/dashboard.webp'));

For pages that progressively load images, full-page mode combined with a readiness condition is safer than relying on a fixed short delay. For a component, selector capture avoids producing a very tall image. A clipping rectangle is useful when neither a whole page nor a semantic element matches the required region.

Override the driver for one capture

You can set a default driver in config/laravel-screenshot.php or with LARAVEL_SCREENSHOT_DRIVER, then select another backend for an individual operation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Screenshot::driver('cloudflare')
    ->url('https://example.com')
    ->save(storage_path('app/screenshots/cloudflare.png'));

For specialized infrastructure, implement the package’s ScreenshotDriver interface and register your custom driver through the package configuration. This keeps calling code unchanged while allowing an internal rendering service.

Rank #3
KYY Portable Monitor 15.6" 1080P Computer Monitor Screen Extender w/Cover
  • [ FHD 1080P PORTABLE MONITOR ]: KYY using a 15.6''(8.8"x14.2") advanced IPS screen with 178° wide viewing angle, Delivers 1920*1080 breathtaking viewing quality and HDR technology, KYY portable gaming monitor has excellent color rendering ability, provide you the clearer, smooth, excellent performance in gaming/multimedia. It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time
  • [ WIDE COMPATIBILITY ]: KYY portable monitor for laptop equipped with 2 Full Function Type-C ports and Mini-HDMI port, easy access to your favorite devices with 1 cable solution as long as your device support Thunderbolt 3 or 3.1 USB-Type-C, compatible with most laptop, smartphone, PC, PS4, XBOX and more.
  • [ ULTRA-SLIM PORTABLE DISPLAY ]: KYY USB C portable monitor features a 0.3inch ultra-slim profile(1.7lb), it is easy to slides into your bag, allows you to carry it everywhere, ideal for a simple on-the-go dual-monitor setup or extend your phone screen for movies or games. No driver needed and equipped with 3.5mm audio inputs and 2 built-in stereo speakers to enhance entertainment experience
  • [ DURABLE SMART COVER ]: Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection and frameless magnetic design for this portable computer monitor. There are two grooves in the cover base to give at least some choice of viewing angle for your comfort for less cumbersome installation
  • [ LIGHTWEIGHT BUT POWERFUL ]: KYY portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. It has a unique designed Premium gray metal appearance, 2 built-in speakers to play audio, a friendly menu control wheel for setting, and 24/7 professional support team

Queue captures instead of blocking web requests

Browser startup and page loading can make a request slow. Use the package’s queued save method when the result can be generated by a queue worker:

Screenshot::url('https://example.com/report')
    ->saveQueued(
        storage_path('app/screenshots/report.png'),
        function (string $path) {
            // Notify the user, attach the file, or persist the path.
        }
    );

Configure a durable queue connection, give the worker enough memory for Chrome, and make the job idempotent so retries do not create confusing duplicate records. Store the requested URL, options, destination, and job status in your database when users need progress visibility.

Test screenshot code without launching a browser

Use the package fake in feature or unit tests. It verifies that your application requested the expected operation without requiring Node.js or Chrome in CI:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
use SpatieLaravelScreenshotFacadesScreenshot;

test('stores the homepage screenshot', function () {
    Screenshot::fake();

    $this->post('/admin/capture');

    Screenshot::assertSaved('https://example.com', storage_path('app/screenshots/home.png'));
});

Keep a small separate smoke test that runs against the real renderer in an environment containing the browser dependencies. The fake catches route and argument regressions; the smoke test catches missing binaries, certificate problems, and rendering changes.

Rank #4
Anyuse 15.6" FHD IPS USB-C HDMI Portable Monitor
  • 15.6" FHD Portable Monitor - Featuring a 1920*1080P resolution, 178°FULL viewing angle, HDR, and Low Blue Light Super Clear IPS A-grade screen, this Anyuse portable screen for laptop enhanced visual experience, reduces eye strain and fatigue.
  • Double Type-C Port -For Plug & Play - Anyuse portable monitor features 2 full-featured Type-C ports and 1 MINI HDMI port. You can easily access your favorite devices with just one USB Type-C or MINI HDMI cable. NOTE: Your device should support Thunderbolt 3.0/4.0 or USB 3.1 Type C DP ALT-MODE.
  • Portable & Light Weight - At just 1.37lbs and 0.04 inch thin, this portable laptop monitor is ultra-portable and perfect for on-the-go productivity or gaming. flexible to use anywhere you need a second screen for laptop. bringing you efficiency for meetings, work from home, and presentations.
  • Able to Balance Work and Play - With multiple display modes [copy mode/extension mode/second screen mode]. During meetings,it can copy your laptop's content as a second screen to share with others.At work, it can be used as a second extended screen to increase productivity. In life, adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights, more realistic colors and images.Two built-in speakers provide an amazing viewing and gaming experience.
  • Wide Compatibility - Enjoy hassle-free plug-and-play functionality with the portable monitor. it is compatible with all devices equipped with HDMI and USB Type-C ports like laptops, PS, XBOX, SWITCH game consoles, No app or driver installation required.

Or skip the browser setup

ScreenshotNeo is a hosted website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF, so Laravel only needs an HTTP client and an API key. See the ScreenshotNeo documentation for all options.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

PHP in Laravel

use IlluminateSupportFacadesHttp;

$response = Http::timeout(90)->get('https://api.screenshotneo.com/v1/shot', [
    'access_key' => config('services.screenshotneo.key'),
    'url' => 'https://stripe.com',
]);

$response->throw();
file_put_contents(storage_path('app/shot.webp'), $response->body());

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
require('fs').writeFileSync('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo accepts consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account to get an API key.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting Laravel screenshots

“Chrome executable not found” or Puppeteer errors

Browsershot cannot locate a Chrome/Chromium binary, or the worker’s PATH differs from your shell. Install a supported browser in the image or VM, ensure the queue user can execute it, and configure the binary path required by your Browsershot version. If you cannot maintain these dependencies, switch to the Cloudflare driver or a hosted API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Composer reports an unsupported PHP or Laravel version

The documented package requirements are PHP 8.4+ and Laravel 12+. Upgrade the application or select a package release compatible with your versions; do not force Composer resolution and discover the mismatch at runtime.

The image is blank or missing JavaScript content

The page was captured before its application finished rendering, or a bot check blocked the browser. Wait for a meaningful selector or network-idle state, increase a deliberate delay, and inspect the target URL manually from the same environment. Authenticated pages require the appropriate cookies or headers in the rendering layer.

Best Value
VILVA 15.6" FHD IPS USB-C HDMI Portable Monitor
  • Experience Unrivaled Visuals: Get the ultimate viewing experience with the VILVA Professional Portable Monitor! With its incredibly sharp 15.6 inch FHD IPS Screen, you'll get a 1920 x 1080 resolution that viewing experience. Get it now and start working smarter, not harder and get yourself the professional portable monitor today.
  • Truly Wide Compatibility: Lets you connect your laptop, PC, MAC, tablet, phone, XBOX, PS3/PS4/PS5, switches, and more via USB-C or HDMI Port-- deliver a stable connection and steady data transmission. Enjoy great sound with the built-in dual stereo speakers, perfect for your business trip, travel, or home entertainment gaming setup.
  • Durable Smart Cover: VILVA portable monitor has a high quality and durable metal material, which makes it shows a fine metal texture and high strength. Has magnetic leather smart cover that provides protection for the entire screen and easy to stand the portable monitor.
  • Look no further!: Get this portable monitor right Now, complete with magnetic cover, USB-C to USB-C cable, Mini HDMI to HDMI cable.

Full-page capture cuts off lazy-loaded sections

Use the package’s full-page option and wait until the page’s content marker appears. Pages that load more items only after scrolling may require custom JavaScript or a capture workflow that scrolls before saving.

Requests time out in production

Check outbound firewall rules, DNS, TLS certificates, queue worker memory, and the target site’s response time. Move long captures to a queue, set an explicit HTTP and job timeout, and record failures for retry rather than holding a browser request open.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Tests fail because a browser is unavailable

Call Screenshot::fake() in tests that verify application behavior and reserve real-browser checks for a configured smoke-test environment.

Security, reliability, and cost considerations

  • Validate destination URLs and block private IP ranges when users can submit URLs.
  • Keep API tokens in environment-backed secrets, never in route parameters or committed files.
  • Use deterministic filenames or content-addressed storage to prevent races between retries.
  • Set retention rules for screenshots because full-page images can contain personal or confidential data.
  • Measure queue duration, browser crashes, timeout rates, and output size in your own environment; the package documentation does not establish a universal performance figure.
  • For hosted rendering, review the provider’s current quotas and pricing. For local rendering, budget for browser images, patching, CPU, memory, and concurrent-worker limits.

Frequently asked implementation choices

Can Laravel screenshot a page without Chrome installed?

Yes. Use the Cloudflare driver, which delegates rendering to Cloudflare Browser Rendering, or use a hosted screenshot API. The local Browsershot path requires Node.js and Chrome/Chromium.

What is the default screenshot size and format?

The documented defaults are a 1280×800 viewport, 2× device scale factor, PNG output, and network-idle waiting. Override them when your design, storage, or downstream processing requires different values.

How do I capture only one element?

Use the package’s CSS-selector capture option and provide a stable selector. Prefer a semantic class or data attribute over a fragile positional selector.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should screenshot generation run in a controller?

Only for short, predictable captures. For long pages, PDFs, or user-triggered batches, dispatch a queued job and notify the caller when the file is ready.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.