ScreenshotNeo

BlogHow-to

How to Set the Screenshot Size in ShrinkTheWeb

Learn where ShrinkTheWeb’s Drupal 8 module sets shared screenshot dimensions and how to pass size options for one capture.

By the ScreenshotNeo team4 October 20265 min read

In the documented Drupal 8 ShrinkTheWeb module, configure shared screenshot settings at admin/config/media/shrinktheweb. For one capture, pass advanced rendering options such as custom_width and max_height. Use native_resolution and widescreen_resolution_y when you mean the browser viewport dimensions rather than the resulting image dimensions. The module guide dates from 2019, so verify that the options and account entitlements still apply to your installation.

1. Choose what “screenshot size” means

There are two different things you may need to size:

  • Output image sizing or crop: custom_width is documented as a custom image width; max_height is documented as the height to crop the image.
  • Browser viewport: native_resolution and widescreen_resolution_y describe browser resolution dimensions. A viewport change can affect responsive layout and therefore what the page looks like before capture.

These parameters are documented by the Drupal integration. Do not assume they are current labels in ShrinkTheWeb’s standalone dashboard or API.

2. Set shared dimensions in Drupal

  1. In Drupal administration, open admin/config/media/shrinktheweb.
  2. Enter the ShrinkTheWeb access and secret keys if they have not already been configured.
  3. Set the shared thumbnail, cache, and additional API parameters available in the module’s configuration.
  4. Save the configuration and generate a screenshot through the integration to check the result.

Global size, length, or browser-resolution changes affect all screenshots that use those shared settings. If only one capture needs a different size, use request-specific advanced options instead. See the Drupal 8 ShrinkTheWeb setup and usage guide.

3. Set dimensions for one Drupal 8 capture

The guide shows these advanced rendering options in a Drupal render array:

$render = [
  '#theme' => 'shrinktheweb',
  '#url' => 'https://example.com',
  '#custom_width' => 600,
  '#max_height' => 320,
  '#native_resolution' => 1020,
  '#widescreen_resolution_y' => 760,
];

This is an illustrative example using the documented values, not a recommended default. The render theme and surrounding integration code may differ in your Drupal site; keep the documented option names and place them in the module’s advanced rendering options.

Option Documented meaning Use it when
custom_width Custom image width The produced thumbnail or image needs a particular width.
max_height Height to crop the image You need to limit the output height by cropping.
native_resolution Browser resolution dimension The page must render at a different browser resolution.
widescreen_resolution_y Widescreen browser resolution Y dimension You need to change the documented widescreen viewport height.

The guide’s example values are not universal. Choose dimensions for the design you need, and check whether your ShrinkTheWeb account has access: the module documentation says some features require an account upgrade but does not establish current plan names or prices.

4. Validate the result

  1. Capture a page with a known layout and inspect the returned image’s pixel dimensions.
  2. Check whether a changed viewport altered responsive breakpoints, navigation, or columns.
  3. Check whether the output was resized or cropped as intended. A viewport change and an output crop are different operations.
  4. Repeat with a long page and a narrow viewport if those are important cases for your site.

5. Common problems

Symptom Likely cause What to do
The screenshot has the old size The option was changed in a scope the capture does not use, or cached output was reused. Confirm whether the capture inherits global settings or has per-request options. Review the module’s cache settings and regenerate after the relevant configuration change.
The page layout changed unexpectedly A browser resolution or viewport dimension changed, triggering responsive styles. Adjust the viewport options deliberately; use output width or crop options when the layout should stay the same.
The image is too short or content is missing max_height crops the image at a height limit. Increase the crop limit or remove the height restriction when the full vertical content is needed.
An option appears to have no effect The option may be unavailable to the account, unsupported by the installed integration, or placed outside its advanced rendering options. Check the Drupal module documentation and account entitlement. The guide is dated, so confirm behavior with the version and service you use.
The Drupal integration is unavailable or behaves inconsistently The Drupal project page has a dated unsupported-status notice for the module. Check the current status of the module and compatibility with your Drupal version. The notice concerns the integration, not proof that the ShrinkTheWeb service itself is offline. See the Drupal project page.

6. Reliability, performance, and cost considerations

Changing a viewport can change the content and layout the browser must render, while changing output width or crop affects the resulting image. For repeatable captures, keep the chosen scope clear and avoid changing shared settings when only one route needs a different result. If caching is enabled, account for it when checking changes.

The available documentation does not provide current ShrinkTheWeb service performance, reliability, or pricing figures. It also does not establish current account entitlements. Confirm those details with the service before relying on an option or estimating ongoing capture costs.

7. Alternative: ScreenshotNeo

If you need to set viewport or output dimensions through a screenshot API instead of configuring the Drupal integration, ScreenshotNeo is a website screenshot API and MCP server. Its API supports any viewport, 12 device presets, retina scale, resizing, and other capture options. The parameter names used by other screenshot APIs also work, which can make switching easier.

For a complete list of options, see the ScreenshotNeo API documentation.

Or skip the browser setup

A single GET request returns a screenshot. This example captures Stripe; replace the target URL with your page and provide your API key:

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

ScreenshotNeo accepts cookie banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits cost nothing, and response headers report the page verdict and billing status. An MCP server gives AI agents such as Claude and Cursor tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up free and get 1,000 screenshots a month with no card.

FAQ

Does changing the global setting affect every screenshot?

It affects all screenshots that use the shared settings. A request can use advanced options to customize an individual capture.

Is max_height the browser viewport height?

No. The Drupal guide describes it as the image height to crop. The browser-resolution options are native_resolution and widescreen_resolution_y.

Are these parameter names guaranteed to work in the standalone ShrinkTheWeb API?

No. The evidence here documents them in the Drupal 8 integration, not as verified current standalone API or dashboard labels.

Does the module’s unsupported notice mean ShrinkTheWeb is offline?

No. The notice concerns the Drupal integration’s project status; it does not establish whether the separate ShrinkTheWeb service is available.