ScreenshotNeo

BlogHow-to

How to Create Ecommerce Product Page Thumbnails with the Cloudinary Screenshot API

Capture a public product page with Cloudinary URL2PNG, then crop the screenshot into a thumbnail. Includes setup, signed delivery, code, and troubleshooting.

By the ScreenshotNeo team4 October 20268 min read

To make a thumbnail of an ecommerce product page with Cloudinary, register for its URL2PNG Website Screenshots add-on, generate a screenshot of the public page with the url2png delivery type, then apply a Cloudinary crop transformation to the resulting image. Cloudinary’s documented example crops a screenshot to 150 × 200 pixels using fill and north gravity. Screenshot generation needs a signed delivery URL or authenticated eager generation by default; plan the capture step accordingly.

This produces a preview of the webpage, including its layout and visible product content. If the goal is a clean image of the item for a product card, start with the original product photo and transform that asset instead. Cloudinary describes both screenshot capture and conventional ecommerce image variations, but they serve different outputs.

What you need before you start

  • A Cloudinary account with the URL2PNG Website Screenshots add-on registered. See the URL2PNG add-on documentation.
  • A publicly accessible product page URL that renders the content you want captured.
  • Your Cloudinary cloud name and credentials for generating a signed URL or using the authenticated API.
  • A target thumbnail size and crop policy, such as a portrait preview or a wide listing card.

The documented add-on covers public websites. Its documentation does not establish that it can capture login-gated pages, bypass bot checks, dismiss consent banners, or render every site’s lazy-loaded catalog correctly. Confirm that you are allowed to capture the target page and inspect the result on the actual site.

Choose the capture and thumbnail dimensions

Decide what the thumbnail should communicate before generating it:

  • Viewport: Choose a desktop or mobile width that reflects the experience you want to preview. Cloudinary documents a viewport option and shows a 640-pixel-wide example.
  • User agent: Set user_agent if the site serves a materially different layout to mobile and desktop visitors.
  • Render delay: Use delay when the page needs time to display content. A delay cannot guarantee that every script, image, or third-party widget will finish.
  • Page height: The documentation’s example includes fullpage=false. Choose whether the capture should represent the initial viewport or the full page, then verify the exact output.
  • Crop: fill produces fixed dimensions and crops overflow. North gravity favors content near the top. Choose another crop position if the product or title is lower on the page.

The 150 × 200 size is Cloudinary’s example, not a universal ecommerce standard. Match your card’s aspect ratio and test the crop against pages with different banners, titles, and product placement.

Capture a product page and create a thumbnail

  1. Register the URL2PNG add-on in Cloudinary.
  2. Build a URL2PNG screenshot delivery URL for the public product page, with the viewport and rendering options you selected.
  3. Sign the screenshot-generating URL or use Cloudinary’s authenticated explicit API to eagerly generate it. These are the documented default approaches.
  4. Apply a normal image transformation to resize and crop the screenshot to your card dimensions.
  5. Review the output for clipped product content, overlays, missing images, and differences between mobile and desktop layouts.

Cloudinary’s URL2PNG syntax places /url2png/ and pipe-separated options after the delivery type, with the website URL as the public ID. A conceptual URL shape is:

https://res.cloudinary.com/CLOUD_NAME/image/url2png/viewport_640|user_agent_mobile|delay_2|fullpage_false/https://store.example/products/item

Replace the example host, path, and options with the values from your account and the current URL2PNG documentation. The screenshot-creating request must be signed or eagerly generated under the default account security behavior. Do not treat the conceptual URL above as a ready-to-use signed URL.

Transform the screenshot into a fixed-size crop

Cloudinary’s documented example uses a 150 × 200 fill crop with north gravity. In a delivery URL, the transformation component is placed between the delivery type and public ID. The shape is:

https://res.cloudinary.com/CLOUD_NAME/image/url2png/c_fill,g_north,w_150,h_200/https://store.example/products/item

Use Cloudinary’s SDK URL helper or authenticated API to construct and sign the actual capture URL. Cloudinary documents that SDKs can construct transformation URLs, and its transformation documentation describes the delivery URL structure. URL syntax and signing depend on the account and asset setup.

Once Cloudinary has created the screenshot using a signed request or authenticated API, the documentation says later transformations of that same image can use unsigned dynamic Cloudinary URLs. You can also add documented image operations such as a border, rounded corners, shadow, or overlay when they fit your card design.

Signed delivery versus eager generation

Cloudinary states that, by default, delivery URLs using this add-on need to be signed or eagerly generated. A signed URL authorizes the screenshot-generating request. Eager generation creates the screenshot through the authenticated explicit API, after which the generated asset can be delivered and transformed.

The account can optionally be configured to allow unsigned add-on transformations, but that changes the documented default safeguard against unplanned dynamic screenshot requests that may create costs. Use that setting only if it matches your account’s security and usage controls.

Automate a batch of product pages

For a catalog, keep the capture configuration consistent and record the source URL, viewport, capture options, and resulting asset identifier for each page. Generate screenshots through your authenticated workflow, then reuse the same derived thumbnail transformation when serving the card. Cloudinary says generated screenshots and derived transformations are cached through its CDN. Reusing identical derivatives avoids creating needless variants; review derived assets and account usage as the catalog changes.

Handle failures per URL so one inaccessible or slow product page does not stop the rest of the batch. Save a status and retry only when the cause is likely temporary. The docs do not promise a universal capture time or success rate, so set timeouts and retry limits based on your own workload rather than assuming every page will render.

Do-it-yourself alternatives and tradeoffs

Cloudinary combines URL2PNG capture with its image delivery and transformation system. This is useful when the result should live in your Cloudinary asset workflow. It requires add-on registration and a signed or eager screenshot-generation step by default. The documented options let you choose viewport, user agent, delay, and full-page behavior; they do not establish reliable handling for every site’s consent overlays, access controls, or bot defenses.

For a normal product image rather than a page preview, transform the source product photograph. Cloudinary’s ecommerce guidance discusses adapting source assets for different devices and channels; a webpage screenshot is a separate presentation asset.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. A single GET request returns a screenshot or PDF. Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf.

For a product page, make a direct request like this (replace the target URL and 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

Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer())));

See the ScreenshotNeo API documentation for request options. It offers 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. Every feature is on every plan. For this product-page use case, it can also capture full pages, select an element by CSS selector, wait for a selector or network idle, and set a viewport or device preset.

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

Troubleshooting

Symptom Likely cause What to do
Screenshot request is rejected or does not generate an asset The URL2PNG add-on is not registered, or the screenshot-generating delivery URL is unsigned under the default security behavior. Register for the add-on and sign the URL or eagerly generate through the authenticated explicit API.
Screenshot shows an unexpected layout The selected viewport or user agent differs from the intended visitor context. Set viewport and, if needed, user_agent; recapture and compare.
Images or product details are missing The page may need more render time, rely on lazy loading, or prevent public capture. Try a documented delay and inspect the page’s public behavior. The add-on documentation does not guarantee every site’s rendering or access behavior.
The thumbnail cuts off the important content A fixed fill crop removes areas outside the target aspect ratio, and north gravity prioritizes the top. Adjust dimensions or gravity, or choose a capture height that better frames the content.
Repeated requests create many derived assets Transformation parameters vary between requests, producing different derivatives. Standardize the thumbnail dimensions and transformation options, and review derived assets and plan usage.
A page behind a login or bot challenge is blank or blocked The consulted add-on documentation supports public-site capture and does not promise access to gated pages or bot-defense bypass. Use a publicly accessible page you are permitted to capture, or choose a capture workflow that supports your authorized access requirements.

Performance, reliability, and cost

  • Cache behavior: Cloudinary documents that the screenshot is cached and delivered through its CDN, and that a derived transformation is cached after its first access. Reuse the same capture and transformation when the page content has not changed.
  • Freshness: A cached screenshot can be stale after a product page changes. Decide how often to create a new screenshot and avoid changing transformation URLs unnecessarily.
  • Reliability: Capture output depends on whether the public page renders in the selected context. Viewport, user agent, and delay are controls, not guarantees that all scripts, images, or access restrictions will behave as desired.
  • Cost and limits: Cloudinary account limits for uploading, transformations, and delivery depend on the plan. The research does not establish current prices, quotas, or per-screenshot charges. Check the current Console plan details and monitor derived assets before scaling.
  • Security: Signed URLs or authenticated eager generation protect the screenshot-generating step by default. Avoid exposing credentials used for authenticated API calls in client-side code.

FAQ

Can I use the screenshot as the product’s main image?

You can create a page preview, but it includes webpage chrome and whatever content appears in the capture. For a clean image of the product itself, use the source product photo.

Does the 150 × 200 example fit every product card?

No. It is an example in the Cloudinary documentation. Match the dimensions and crop to your layout.

Can I make the screenshot URL public without signing it?

Unsigned add-on transformations can be enabled as an account security setting, but Cloudinary documents signed delivery or eager generation as the default.

The consulted Cloudinary materials do not document those behaviors. Do not rely on them without validating the target page and the add-on’s current documentation.

Sources