Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsIn a Laravel app, you can capture a webpage locally with Spatie’s laravel-screenshot package and its default Browsershot driver, use the package’s Cloudflare driver, or call Cloudflare Browser Rendering directly. The current Spatie requirements list PHP 8.4+ and Laravel 12+, so check your versions before choosing the package. The integration steps below are generic; they do not establish India-specific pricing, taxes, service availability, data residency, or capture latency.
Choose a capture route
| Route | What runs the browser? | When it fits | Key dependency |
|---|---|---|---|
| ScreenshotNeo API | ScreenshotNeo’s hosted screenshot service | You want a one-request API and want consent banners, popups, and chat widgets removed before capture. | ScreenshotNeo API key. See ScreenshotNeo. |
| Spatie package with Browsershot | Chromium on your application server | You want a Laravel facade and control over the browser runtime. | Compatible PHP and Laravel, Node.js, and Chrome/Chromium. |
| Spatie package with Cloudflare driver | Cloudflare Browser Rendering | You want Spatie’s Laravel interface without installing Node.js or a browser on the Laravel server. | Cloudflare account, Browser Rendering enabled, account ID, and API token. |
| Direct Cloudflare API | Cloudflare Browser Rendering | You want to construct the API request and handle its response directly. | Cloudflare account and token with Browser Rendering Write permission. |
Spatie’s current requirements page lists PHP 8.4+ and Laravel 12+. Those are package compatibility requirements, not a claim that every existing Laravel deployment meets them. Check the requirements before installing.
Use Spatie with the local Browsershot driver
Spatie’s laravel-screenshot package provides a Laravel facade for webpage captures. Browsershot is its default driver and uses Chromium, so Composer installation alone does not provide the required browser runtime. Install Node.js and Chrome or Chromium in the deployment environment as well.
Install and capture a page
-
Confirm the PHP and Laravel versions meet the current requirements.
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. -
Install the package:
composer require spatie/laravel-screenshot -
Install and configure Node.js and a Chrome/Chromium binary where the Laravel app runs. If paths differ from the defaults, Spatie’s configuration supports
LARAVEL_SCREENSHOT_CHROME_PATH,LARAVEL_SCREENSHOT_NODE_BINARY, andLARAVEL_SCREENSHOT_NPM_BINARY. -
Call the facade from application code:
use SpatieLaravelScreenshotFacadesScreenshot; Screenshot::url('https://example.com')->save('screenshot.png');
The documented default capture is 1280×800, device scale factor 2, PNG, with a networkidle2 wait. These are configuration defaults, not performance guarantees. Set dimensions and quality when needed:
Screenshot::url('https://example.com')
->width(1920)
->height(1080)
->quality(80)
->save('screenshot.jpg');
For Browsershot-specific image controls—including full-page capture, clipping, image formats, and device scale—see Browsershot image generation.
Use Spatie’s Cloudflare driver
This route retains Spatie’s Laravel package interface while delegating rendering to Cloudflare Browser Rendering. It avoids installing Node.js and a Chrome binary on the Laravel server, but adds a Cloudflare account and API dependency.
Recommended Free Tools
-
Install
spatie/laravel-screenshotas shown above and meet its PHP and Laravel requirements. -
Create a Cloudflare API token with Browser Rendering permission, obtain the Cloudflare account ID, and enable Browser Rendering.
-
Set the driver and credentials in the server environment:
LARAVEL_SCREENSHOT_DRIVER=cloudflare CLOUDFLARE_API_TOKEN=your-api-token CLOUDFLARE_ACCOUNT_ID=your-account-id -
Use the package facade to capture a URL. To choose Cloudflare for an individual capture, use the package’s
driver('cloudflare')configuration; alternatively, set it as the default driver. See Spatie’s driver configuration.Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Keep the token in server-side configuration; do not send it to browser clients. Spatie documents the setup in its installation and setup guide.
Call Cloudflare Browser Rendering directly from Laravel
Cloudflare documents the screenshot endpoint as POST https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/screenshot. It accepts URL or HTML input and options such as viewport, full-page capture, output type, quality, selectors, clipping, and page-wait settings. Authentication uses a Bearer API token with Browser Rendering Write permission. The example below illustrates a Laravel HTTP-client request shape; it is not presented as tested code.
Rank #3
Configure credentials server-side
Store the account ID and token in environment-backed Laravel configuration, for example in config/services.php, then access them through config(). Do not embed credentials in frontend code or expose them in a public response.
Send a screenshot request and check the response
use IlluminateSupportFacadesHttp;
$accountId = config('services.cloudflare.account_id');
$url = 'https://example.com';
$response = Http::withToken(config('services.cloudflare.browser_rendering_token'))
->acceptJson()
->post("https://api.cloudflare.com/client/v4/accounts/{$accountId}/browser-rendering/screenshot", [
'url' => $url,
'screenshotOptions' => [
'type' => 'png',
'fullPage' => true,
'viewport' => ['width' => 1280, 'height' => 800],
],
]);
if (! $response->successful()) {
// Handle the HTTP error; do not treat this as a successful capture.
throw new RuntimeException('Cloudflare screenshot request failed: '.$response->status());
}
$payload = $response->json();
if (! is_array($payload) || ($payload['success'] ?? false) !== true) {
$errors = $payload['errors'] ?? [];
throw new RuntimeException('Cloudflare did not report a successful capture: '.json_encode($errors));
}
// Process the successful response according to the selected response encoding.
Confirm the response representation and encoding against Cloudflare’s current screenshot endpoint documentation before writing the result to a file or returning it from your app. The endpoint documentation includes a rate-limit error example, so handle failed requests rather than assuming every POST produces an image. If you need both rendered HTML and a screenshot, Cloudflare documents a separate snapshot endpoint.
Run captures in the background when appropriate
A screenshot request may take long enough to keep it out of a user-facing web request. Spatie supports queued generation with saveQueued(), queue or connection selection, delays, and custom job settings. Its queued-generation documentation says saveQueued() cannot be combined with withBrowsershot(); check that constraint when customizing a queued capture. See Spatie’s queued screenshot generation guide.
Or skip the browser setup: use ScreenshotNeo
For a hosted screenshot API, ScreenshotNeo is an alternative that returns an image or PDF from a GET request. Its clean-shot workflow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. ScreenshotNeo also offers an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools. The API accepts common screenshot parameter names used by other services.
Example Laravel call, saving the response body as a WebP file:
use IlluminateSupportFacadesHttp;
$response = Http::timeout(90)->get('https://api.screenshotneo.com/v1/shot', [
'access_key' => config('services.screenshotneo.access_key'),
'url' => 'https://example.com',
]);
if (! $response->successful()) {
throw new RuntimeException('ScreenshotNeo request failed: '.$response->status());
}
file_put_contents(storage_path('app/screenshot.webp'), $response->body());
See the ScreenshotNeo API documentation for request options and response details. Plans include 1,000 shots per month free with no card, then paid options starting at $5 for 3,000 shots; yearly billing gives two months free. Every feature is on every plan. Those are the stated plan prices and allowances, not an India-specific tax or availability statement.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #4
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common problems
The package rejects the project’s PHP or Laravel version
Check the current package baseline first: PHP 8.4+ and Laravel 12+. If your app does not meet it, do not assume the current package version is compatible; verify the package’s requirements before upgrading or selecting another route.
Browsershot cannot find Node.js or Chrome
Composer does not install these runtime dependencies. Install Node.js and Chrome/Chromium in the environment that executes the capture. If the binaries are installed outside the expected paths, configure LARAVEL_SCREENSHOT_NODE_BINARY, LARAVEL_SCREENSHOT_NPM_BINARY, and LARAVEL_SCREENSHOT_CHROME_PATH as needed.
The Cloudflare request is rejected
Verify the account ID, API token, Browser Rendering enablement, and token permission. For direct API calls, inspect both the HTTP status and the response’s success and errors fields; Cloudflare documents rate-limit failures, so build an error path instead of assuming the response contains a screenshot.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The capture is incomplete or too large for the intended use
Check whether you need viewport-only or full-page capture, and set viewport dimensions and output type deliberately. Spatie documents dimensions and quality controls; Cloudflare documents viewport, full-page, output type, quality, selectors, and clipping options. A full-page image can be larger than a viewport image, so consider the destination and storage needs when choosing the capture settings.
Best Value
A queued customization conflicts with Browsershot
Spatie’s queued-generation guide states that saveQueued() cannot be combined with withBrowsershot(). Use a supported queued configuration or revise the customization rather than combining those calls.
What India-specific details are established?
The documented Laravel and API integration mechanics are not India-specific. The cited package and API documentation do not establish India-specific account eligibility, current local pricing or taxes, data residency, where captures execute, or latency from India. Check the providers’ current terms and account dashboards for those details before making deployment or cost assumptions.
Frequently Asked Questions
How do I use a screenshot API in a Laravel app?
Choose local Browsershot, Spatie’s Cloudflare driver, or a direct Cloudflare API call based on whether you want to manage a browser runtime, use a hosted renderer through Spatie, or handle the HTTP request yourself. The steps and code examples above show each route.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →How can I take a webpage screenshot from Laravel without installing Chromium?
Use Spatie’s Cloudflare driver or a hosted screenshot API such as ScreenshotNeo. The Cloudflare route requires an enabled Browser Rendering account and credentials; ScreenshotNeo provides a GET-based screenshot API.
Quick Recap
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.

