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

You can call a screenshot service from Laravel with its built-in HTTP client, but the available ShrinkTheWeb integration documentation is a Drupal guide last updated on March 4, 2019—not a current Laravel or API reference. It does not establish ShrinkTheWeb’s current endpoint, authentication format, response type, or error format. Confirm those details in current ShrinkTheWeb documentation or your account before sending a production request. The example below shows the Laravel request pattern, not a verified copy-and-paste ShrinkTheWeb call.

What you need to confirm before writing the request

The historical ShrinkTheWeb Drupal guide says account holders can find an Access key and Secret key in their account profile. It also documents screenshot settings, but those details describe the Drupal integration as documented in 2019 and may not match the current API contract. The service homepage does not establish the current request details.

Before implementing the call, obtain the current provider documentation or account-specific instructions and verify:

  • The API endpoint and whether it accepts GET or another HTTP method.
  • How the Access key and Secret key must be transmitted, including any signing or encoding steps.
  • The exact parameter names and supported screenshot options.
  • Whether a successful response contains image bytes, a hosted image URL, or another result format.
  • How the API represents errors, request limits, and feature entitlements.

Do not infer these values from the old Drupal guide or copy example credentials into application code.

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

Make the request with Laravel’s HTTP client

Laravel’s HTTP Client is a framework-supported wrapper around Guzzle. Its request methods accept query parameters, can add headers, and return a response object you can inspect. The example uses an endpoint configured for your application and includes only a generic url parameter. Replace the endpoint, authentication, and parameters with values confirmed by ShrinkTheWeb.

<?php

use IlluminateSupportFacadesHttp;
use RuntimeException;

$targetUrl = 'https://example.com/';

$response = Http::timeout(20)->get(config('services.shrinktheweb.endpoint'), [
    // Add the verified ShrinkTheWeb parameters and authentication here.
    'url' => $targetUrl,
]);

if (! $response->successful()) {
    // Do not log credentials or a full URL containing credentials.
    throw new RuntimeException('Screenshot request failed.');
}

$imageBytes = $response->body();

This is a Laravel integration shape, not a verified ShrinkTheWeb request. In particular, do not assume the service returns image bytes just because the example reads the response body. If current provider instructions specify headers, Laravel supports adding them with withHeaders([...]) before the request. Check the returned status and content type against the actual response format before saving or serving the result.

Keep credentials in server-side configuration

Store credentials in environment-backed configuration rather than Blade templates, browser JavaScript, a public image URL, logs, or source control. For example, define environment variables and expose them through a Laravel config entry such as config('services.shrinktheweb.endpoint'). Use the exact credential names and transmission method required by the provider; the old guide’s mention of Access and Secret keys does not confirm how current API requests authenticate.

Validate the requested URL

If a visitor chooses the page to capture, validate and normalize that input before making an outbound request. At a minimum, accept only intended schemes such as HTTPS, and consider restricting permitted hosts if the feature does not need arbitrary destinations. This reduces malformed requests and helps prevent your application from being used to request internal or otherwise unintended addresses.

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

Set timeouts and handle responses deliberately

Give the request a finite timeout appropriate to your page-capture workflow. A timeout prevents a slow provider response from holding a web request open indefinitely. Handle unsuccessful HTTP responses explicitly, and distinguish transport failures or timeouts from a provider-generated error. Avoid logging secrets or complete request URLs if credentials are sent in query parameters.

What the historical guide says about screenshot options

The Drupal guide last updated March 4, 2019 lists these option names and behaviors for its ShrinkTheWeb integration. Treat them as historical clues to verify, not a current API specification or a guarantee that the same options are available to your account.

Historical option or feature What the guide says What to verify now
url The page address to capture. Current parameter name, accepted URL formats, and authentication requirements.
custom_width Listed as a custom-size capture option. Current width limits and any companion height parameter.
full_length Listed as a capture option. Current meaning, supported output behavior, and plan access.
max_height Listed as a capture option. Current limits and interaction with full-page capture.
native_resolution Listed as a capture option. Whether it remains supported and what resolution it produces.
widescreen_resolution_y Listed as a capture option. Current accepted values and relationship to viewport dimensions.
delay The guide describes a delay in seconds after page load. Current units, maximum, and whether page-load behavior differs.
quality The guide says quality ranges from 1 to 100. Whether this range and its output-format effect remain current.
Specific page capture The guide says capturing beyond the homepage requires the “Inside Pages” upgrade. Whether this entitlement still exists and applies to your account.

The same guide warns that some features require an account upgrade. Confirm present-day availability and plan entitlements in your ShrinkTheWeb account before building around a particular option.

Cache and serve screenshots safely

The older guide describes configuring where screenshots are cached and for how long. For a Laravel site, decide whether to cache the returned image bytes or a provider-hosted result URL based on the response format the current API actually returns, the provider’s terms, and how often the target page should refresh. Use a cache key that accounts for the target URL and every option that changes the resulting image; otherwise a request for one size or page could return another request’s cached screenshot.

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

Do not expose API credentials through a public image URL. If the provider returns a URL, verify whether it is intended to be public and how long it remains valid before storing or displaying it.

Troubleshoot missing or incorrect screenshots

  • Authentication fails: Recheck the current account instructions for the exact key names, signature requirements, and whether credentials belong in query parameters or headers. The historical Drupal guide alone is not enough to establish these details.
  • The request returns an error: Inspect the HTTP status and the provider’s documented error response. Log a safe summary, not secret values or credential-bearing URLs.
  • The output is a URL instead of an image: Follow the provider’s documented response format rather than saving the response body as image bytes. Check content type and parse the response as specified.
  • The screenshot shows the homepage instead of an inside page: Confirm the submitted URL is the intended path and check whether the account has the required current entitlement. The 2019 Drupal guide says its “Inside Pages” feature required an upgrade; verify whether that still applies.
  • The dimensions or quality are wrong: Confirm the option names, units, ranges, and account access in current documentation. The parameter names and quality range in the old Drupal guide may have changed.
  • The request hangs or fails intermittently: Keep a finite timeout, handle connection and timeout exceptions, and provide a retry only when appropriate for the provider’s current rate and billing rules.
  • A screenshot looks stale: Check both your Laravel cache and any provider-side caching behavior or refresh controls documented for the current service.

Why not use the old Drupal module?

The Drupal.org ShrinkTheWeb project page marks the Drupal module unsupported and obsolete, and says it appeared no longer supported as of January 31, 2022. That status applies to the Drupal integration; it does not by itself establish the status of ShrinkTheWeb as a service. It is not a maintained Laravel package recommendation. For Laravel, use the framework HTTP client and implement against the provider’s current API contract.

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

Or skip the browser setup

If you need a screenshot API with a documented one-call pattern, ScreenshotNeo accepts a URL and returns a screenshot or PDF. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed; and an MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000 shots.

For a Laravel backend, make the request from the server and keep the key out of browser code:

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

use IlluminateSupportFacadesHttp;

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

if (! $response->successful()) {
    throw new RuntimeException('Screenshot request failed.');
}

$imageBytes = $response->body();

See the ScreenshotNeo documentation for request details and response headers. Sign up for free: 1,000 screenshots a month, no card required.

Frequently Asked Questions

Does the 2019 ShrinkTheWeb guide confirm the current API endpoint?

No. It is a historical Drupal integration guide and does not establish the current ShrinkTheWeb endpoint.

Is the Drupal ShrinkTheWeb module a Laravel package?

No. The Drupal.org project is a Drupal module and is marked unsupported and obsolete; it is not a maintained Laravel package recommendation.

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.

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