What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Fastest practical answer: use Spatie Browsershot to ask Puppeteer and headless Chrome or Chromium to render a URL, then save the resulting image from PHP. The PHP call is short, but the deployment still needs Node.js, Puppeteer and a Chrome/Chromium binary. Once that runtime is available, you can capture a viewport, a full page, one element or a clipped region and control waiting, dimensions, format and mobile emulation.

What you need before writing PHP

Browsershot is a PHP wrapper around Puppeteer, which controls a headless Chrome/Chromium browser. Install the package according to the official introduction, and verify that the account running PHP can execute Node.js and the browser binary. The Laravel Screenshot requirements also explicitly list Node.js and Chrome/Chromium for its Browsershot driver (requirements).

  • A supported PHP application and Composer.
  • Node.js with the Puppeteer runtime required by your Browsershot version.
  • Chrome or Chromium installed and executable by your web-server user.
  • A writable directory for the output file.
  • Outbound network access if the target is not local.

Do not describe this as a PHP-only solution: the browser process is part of your production deployment. Test the same user, permissions and container image used by the web application.

Minimal URL-to-image example

After the dependencies are installed, this is the documented starting point:

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.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
<?php
use SpatieBrowsershotBrowsershot;

$pathToImage = __DIR__ . '/storage/example.png';

Browsershot::url('https://example.com')
    ->save($pathToImage);

The default output is PNG. The browser loads the page, renders its HTML, CSS and JavaScript, and writes the image to the path you provide. Use an absolute path and ensure the directory exists and is writable.

Choose the capture area and viewport

Capture the complete page

Browsershot::url('https://example.com')
    ->fullPage()
    ->save(__DIR__ . '/storage/full-page.png');

fullPage() asks the browser to include the document’s full scrollable height rather than only the visible viewport. Very long or continuously growing pages can produce large images; control page content and waits before capturing.

Fix the browser viewport

Browsershot::url('https://example.com')
    ->windowSize(1440, 900)
    ->save(__DIR__ . '/storage/desktop.png');

Viewport dimensions affect responsive breakpoints, wrapping and lazy-loading behavior. Record them with your output if screenshots are used for visual regression or documentation.

Capture one element

Browsershot::url('https://example.com')
    ->select('.pricing-card')
    ->save(__DIR__ . '/storage/card.png');

Use a stable CSS selector. If the selector is missing, the capture cannot represent the intended target, so wait for it when the page builds it asynchronously.

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

Clip a defined rectangle

Browsershot::url('https://example.com')
    ->clip(0, 0, 1200, 700)
    ->save(__DIR__ . '/storage/hero.png');

Clipping uses x and y coordinates plus width and height in CSS pixels. It is useful when you need a predictable region instead of a selector.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Control format, quality and pixel density

JPEG output

Browsershot::url('https://example.com')
    ->setScreenshotType('jpeg', 85)
    ->save(__DIR__ . '/storage/page.jpg');

JPEG quality trades file size against compression artifacts. Keep PNG for text-heavy interfaces or transparency-sensitive assets; choose JPEG when a smaller photographic image is more important.

Retina-style output

Browsershot documents device scale-factor controls. A higher scale factor captures more physical pixels for the same CSS viewport, increasing sharpness and file size. Set it deliberately and use the same value in repeatable jobs.

Mobile emulation

Use the documented mobile-device emulation options when you need mobile layout, user-agent and device metrics rather than merely shrinking a desktop viewport. Verify the selected preset and viewport in your installed Browsershot version.

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

Wait for the page to become capturable

A screenshot taken immediately after navigation can miss JavaScript-rendered content, fonts or lazy images. Select a wait condition that matches the site:

Network idle

Browsershot::url('https://example.com')
    ->waitUntilNetworkIdle()
    ->fullPage()
    ->save(__DIR__ . '/storage/ready.png');

Network-idle waiting is convenient, but analytics, polling and streaming connections may keep a page busy indefinitely. Browsershot also documents a less strict network-idle mode; use it when ongoing background requests are expected.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Wait for a selector

Browsershot::url('https://example.com')
    ->waitForSelector('.results-table')
    ->save(__DIR__ . '/storage/results.png');

This is usually more meaningful than a fixed delay when a known component signals readiness.

Wait for a JavaScript condition or delay

Browsershot::url('https://example.com')
    ->waitForFunction('window.renderComplete === true')
    ->save(__DIR__ . '/storage/complete.png');

Browsershot::url('https://example.com')
    ->setDelay(2000)
    ->save(__DIR__ . '/storage/delayed.png');

A condition tied to application state is preferable. A fixed delay is a fallback when you cannot expose a reliable selector or flag, but it can be too short on a busy host and waste time on a fast one.

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

Build a production-safe PHP capture function

<?php
use SpatieBrowsershotBrowsershot;

function capture(string $url, string $output): void
{
    if (!filter_var($url, FILTER_VALIDATE_URL)) {
        throw new InvalidArgumentException('Invalid URL');
    }

    $directory = dirname($output);
    if (!is_dir($directory) && !mkdir($directory, 0775, true) && !is_dir($directory)) {
        throw new RuntimeException('Cannot create output directory');
    }

    Browsershot::url($url)
        ->windowSize(1440, 900)
        ->waitUntilNetworkIdle()
        ->fullPage()
        ->save($output);
}

capture('https://example.com', __DIR__ . '/storage/example.png');

In a web endpoint, validate and authorize destination URLs to avoid turning the browser into a server-side request forgery tool. Restrict schemes to HTTPS or an explicitly allowed local host, reject private-network targets where appropriate, and never let a caller choose arbitrary filesystem paths. Keep capture jobs outside the request cycle when they may take longer than your HTTP timeout.

Common failures and fixes

“Node” or browser executable not found

Cause: the PHP process has a different PATH, or Chrome is absent. Fix: install the required runtime, configure the executable path supported by your Browsershot release, and run a diagnostic command as the web-server user.

Permission denied writing the image

Cause: the destination directory is not writable by PHP. Fix: create a dedicated output directory, set ownership for the service account, and avoid making the entire application tree writable.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Blank or incomplete screenshot

Cause: capture occurred before client-side rendering, a selector never appeared, resources failed, or the page requires authentication. Fix: use a selector or function wait, increase the timeout supported by your version, inspect browser logs, and provide required cookies or headers through the documented Browsershot options.

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

Network-idle timeout

Cause: long polling, ads or analytics prevent a strict idle state. Fix: use the less strict idle mode, wait for a page-specific selector, or remove nonessential requests in the page being captured.

Different layout in production

Cause: viewport, device scale, fonts, user agent, timezone or geolocation differ between environments. Fix: set these values explicitly and install the fonts required by the design.

Alternatives when Browsershot is not the right deployment fit

chrome-php/chrome gives PHP direct control of Chrome or Chromium and can suit teams that want lower-level browser control. Playwright PHP exposes Playwright’s browser automation model. A hosted API removes the browser binary from your server but sends capture requests and target-page data to an external provider; review credentials, privacy and service terms before adopting one. The available documentation does not establish a performance winner among these approaches.

Approach Browser location PHP integration Best fit
Browsershot Your server High-level Puppeteer wrapper Quick URL, full-page and element captures when Node.js and Chrome are available
chrome-php/chrome Your server Direct Chrome control Applications needing lower-level browser operations
Playwright PHP Your server Playwright API Teams standardizing on Playwright workflows
Hosted screenshot API Provider infrastructure HTTP request Hosts that cannot install or operate a browser runtime
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is the fastest hosted option to try first when you do not want Node.js and Chrome in your PHP deployment: it removes cookie banners, newsletter popups and chat widgets before the shot, bills only clean captures, and does not bill bot checks, blank pages, timeouts, failed loads or cache hits. It also provides an MCP server so Claude, Cursor and other MCP clients can call take_screenshot, get_page_info and capture_pdf.

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

Send one GET request (see the ScreenshotNeo API documentation):

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

From PHP, use cURL or any HTTP client and keep the key in an environment variable:

<?php
$url = 'https://api.screenshotneo.com/v1/shot?access_key=' . urlencode(getenv('SCREENSHOTNEO_KEY')) . '&url=' . urlencode('https://stripe.com');
$ch = curl_init($url);
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 90]);
$body = curl_exec($ch);
if ($body === false) { throw new RuntimeException(curl_error($ch)); }
file_put_contents(__DIR__ . '/storage/shot.webp', $body);
curl_close($ch);

The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Operational and cost considerations

  • Local browsers give you control over data location but consume CPU, memory, disk and process slots. Limit concurrency and clean temporary profiles.
  • Hosted capture avoids browser maintenance but requires an API key, network access and a policy decision about sending URLs and authenticated content externally.
  • Cache deterministic captures where appropriate, but invalidate them when page data, CSS or fonts change.
  • Store failures with the URL, viewport, wait strategy and browser version so a visual discrepancy can be reproduced.
  • Do not promise a universal capture time or fidelity: page complexity, third-party resources and runtime capacity determine results.

Practical checklist

  1. Install and test Node.js, Puppeteer and Chrome/Chromium as the production service user.
  2. Choose viewport, full-page, element or clip capture explicitly.
  3. Wait for a selector or application condition when JavaScript or lazy loading is involved.
  4. Set output format, quality and scale factor for the consuming system.
  5. Validate URLs, protect credentials and restrict filesystem output.
  6. Test authenticated, slow, error and continuously polling pages before scheduling jobs.

Frequently Asked Questions

Can PHP 5.6 run this workflow?

The historical community question does not establish compatibility. Check the PHP and package requirements of the Browsershot version you intend to install; do not select a release solely because an old PHP version was once mentioned online.

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

Should I use PNG or JPEG?

Use PNG for crisp interface text and lossless output; use JPEG with an explicit quality when smaller photographic files matter. The choice is part of your capture contract.

Is a fixed sleep enough for a JavaScript site?

It can work as a fallback, but a selector or page-state condition is more reliable because rendering time varies.

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.