Weave 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
Screenshots

Screenshots Laravel Package

urlbox/screenshots

Laravel wrapper for the Urlbox screenshot API, letting you capture full-page or viewport screenshots of any website as PNG or JPEG, with options for thumbnails, device sizes, retina, and custom rendering.

View on GitHub
Deep Wiki
Context7

urlbox/screenshots is a PHP client for the Urlbox screenshot API, making it easy to capture high-quality images of any web page. Configure viewport size, full-page capture, retina output, delays, cookies, headers, and formats such as PNG, JPEG, WebP, or PDF—then integrate screenshots into Laravel or plain PHP applications.

  • Simple wrapper for generating screenshots and PDFs
  • Full-page, retina, and custom viewport options
  • Support for delays, cookies, headers, and page interactions
  • Multiple output formats, including PNG, JPEG, WebP, and PDF
  • Laravel-friendly configuration and error handling
Frequently asked questions about Screenshots
How do I install urlbox/screenshots in a Laravel project?
Run composer require urlbox/screenshots. The package is framework-agnostic PSR-4 code with no Laravel coupling, so there is nothing to publish and no facade to register. You create a container binding yourself and inject the client where you need it.
Does urlbox/screenshots support Laravel 10, Laravel 11 and PHP 8.2 or 8.3?
The package has no Laravel dependency at all, so it works with Laravel 10, Laravel 11 and PHP 8.2 or 8.3 as long as its Guzzle constraint resolves against your lockfile. Check the Guzzle major version and PHP requirement before adding it, because a low-activity package is a poor candidate for permissive caret constraints.
How do I configure the Urlbox API key and secret in Laravel?
Put URLBOX_KEY and URLBOX_SECRET in your .env file, reference them from config/services.php, and bind a configured client instance in AppServiceProvider or a dedicated service provider. Back the values with a secrets manager in production rather than committing them. Request signing over the target URL is handled by the SDK, which removes the most common cause of 401 responses.
Can I capture full-page, retina or device-emulated screenshots?
Yes. Urlbox supports full-page and viewport captures, custom dimensions, retina output, image formats such as PNG, JPG and WebP, device emulation, render delays, and ad or cookie-banner blocking. Confirm that the SDK exposes every option you need before committing, since unusual settings may require building query strings by hand.
Should screenshot generation run in a queue instead of inline in a request?
Always use a queue. Renders take several seconds, so calling the API inline will pin PHP-FPM workers and blow through request timeouts under load. Dispatch a job, write the returned image to a storage disk such as S3, and serve it through a signed URL. The package itself has no persistence, caching, retention or per-tenant quota logic, so all of that stays your responsibility.
How does urlbox/screenshots report errors and failures?
The client is a thin wrapper over Guzzle, so expect raw or lightly wrapped Guzzle exceptions rather than a rich typed exception hierarchy. Catch them at your adapter boundary and convert them into your own exception type so queue retry and alerting logic stays stable. Verify the actual behaviour against your installed version before relying on it, and check whether response metadata such as render time and final URL is surfaced for observability.
Is there a Laravel service provider or facade for urlbox/screenshots?
No. The package ships no service provider, no facade and no auto-discovery, which is deliberate because it keeps the client as a stateless adapter. You own the container binding, the config entry and the wrapper service or contract in your application layer. That small amount of glue is what makes the vendor swappable later.
Is it safe to send internal URLs and user page content to Urlbox?
Every request transmits the target URL, and often PII-bearing page content, to a third-party SaaS. Internal hostnames, pre-signed URLs in query strings and tenant-identifying paths can end up in vendor logs, so treat this as a compliance review item rather than a code review item. Validate and redact URLs before dispatch and confirm the vendor's data-retention, GDPR and DPA terms.
How much does urlbox/screenshots cost and what are the rate limits?
The package is MIT licensed and free, but it is a client for a paid single-vendor API, so you pay Urlbox per render. Before committing, confirm pricing, monthly quota, concurrency limits and overage behaviour at your projected volume. There is no built-in failover or second provider, so an outage or price change at the vendor is your outage or margin event.
What are the alternatives to urlbox/screenshots if I need to switch?
Direct Guzzle calls against the Urlbox endpoints, other hosted renderers such as ScreenshotOne, ApiFlash or Browserless, or self-hosted Playwright and Browsershot. Because the wrapper is thin and MIT licensed, forking or replacing it is cheap, likely a few hundred lines over Guzzle. Plan that exit deliberately rather than assuming the vendor relationship will last.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package