ScreenshotNeo

BlogHow-to

How to Use Chromium Screenshots to Make Website Thumbnails in India

Capture website thumbnails with headless Chromium. Choose a viewport, save the screenshot, and handle mobile layouts, full pages, and common capture issues.

By the ScreenshotNeo team4 October 20266 min read

Use headless Chromium’s --screenshot flag to render a website and save its visible viewport as an image. Choose the viewport size to match where the thumbnail will appear, and capture separate sizes when you need both desktop and mobile layouts. Chrome’s documented examples include 1280×1696 and 412×732; they are examples, not universal thumbnail standards. The workflow is the same in India as elsewhere: the available sources establish no India-specific installation command, thumbnail requirement, or technical rule.

1. Capture a website thumbnail from the command line

  1. Install Chrome or Chromium in the environment where the capture will run.
  2. Find the browser executable name. Depending on the installation, it may be chrome, chromium, or another name.
  3. Choose a width and height that suit the thumbnail’s destination and the site’s layout.
  4. Run headless Chromium with --screenshot and the URL. The output file is written in the current working directory.
  5. Open the image and check that the page loaded and the visible composition is useful.
chrome --headless --screenshot https://example.com/

Set an intentional viewport when the default browser dimensions are not suitable:

chrome --headless --screenshot --window-size=1280,1696 https://example.com/

The documented Chrome command shape is chrome --headless --screenshot https://example.com/. Replace chrome with the executable available in your environment. The examples here follow Chrome’s official headless screenshot documentation (Chrome headless documentation).

2. Choose thumbnail dimensions and page coverage

The viewport controls which responsive layout the website renders and how much of the page appears in a viewport screenshot. Match it to the display context rather than assuming one size works for every thumbnail.

Goal Approach Considerations
Desktop preview Use a wide viewport, such as the documented 1280×1696 example. Check that the page’s important content is visible at that width.
Mobile preview Use a narrow viewport, such as the documented 412×732 example. Responsive navigation and layout may differ from desktop. Capture it separately.
Representative thumbnail Capture the viewport that shows the intended page view. A viewport capture is not the whole document.
Full-page record Use a browser automation API that supports capture beyond the viewport. Long pages may produce tall images that are awkward as compact thumbnails.

The Web App Manifest screenshots reference describes screenshots for distinct usage scenarios and form factors; where a narrow and wide context both matter, keep separate images (Web App Manifest screenshots reference). For a full-page image, Puppeteer exposes captureBeyondViewport; its documented default is false without a clip and true with a clip (Puppeteer screenshot options).

3. Capture mobile and desktop variants

Run a separate capture for each viewport. Give outputs distinct filenames so a later capture does not overwrite the first:

chrome --headless --screenshot=thumbnail-desktop.png --window-size=1280,1696 https://example.com/
chrome --headless --screenshot=thumbnail-mobile.png --window-size=412,732 https://example.com/

These dimensions are illustrative values from Chrome documentation, not prescribed sizes. If your Chromium build does not accept the filename form shown, run the documented --screenshot command from a separate output directory for each variant, or use a browser automation library to set the output path explicitly.

4. When to use browser automation instead

The command-line flag is suitable for a quick local capture. A scriptable browser workflow is more appropriate when you need to set a precise output path, wait for a page condition, capture a particular element, or control full-page behavior. For example, Puppeteer’s screenshot API supports options such as path, clip, and capture beyond the viewport; consult its current API documentation for the option details and defaults (Puppeteer screenshot options).

Keep thumbnail generation simple when the purpose is only a page preview. Use full-page capture when the entire document is a requirement, not simply because the page is scrollable. A full-page screenshot can be too tall to read when reduced to thumbnail size.

5. Review and prepare the saved image

  1. Confirm the file exists in the expected working directory and opens as an image.
  2. Check that the browser captured the expected responsive layout and page state.
  3. Look for content that arrived late, overlays, or a blank or partially loaded page.
  4. If the thumbnail must represent a mobile and desktop experience, inspect both captures separately.
  5. Crop or resize for the destination after capture if it requires a particular aspect ratio. No universal thumbnail ratio is established by the sources used here.

6. Troubleshooting Chromium screenshots

Symptom Likely cause What to do
chrome: command not found The executable is absent from PATH or has a different name. Install Chrome or Chromium for the environment, then use the installed executable name or its full path. Installation steps vary by operating system and distribution.
No image appears where expected The screenshot was saved in the command’s current working directory, or the command used a different output name. Check the working directory and the browser’s output. Run from a known directory and specify a screenshot filename if supported by the installed build.
The layout looks wrong The viewport dimensions selected a different responsive breakpoint than intended. Set --window-size=WIDTH,HEIGHT to match the target context and capture the other form factor separately.
The image shows only the top portion --screenshot captures the viewport; it does not by itself mean the whole document is captured. Use a browser automation API with full-page capture support if the complete page is required.
Page content is missing or incomplete The page may still be loading or may depend on delayed scripts or resources. Inspect the saved image and use a browser automation workflow that can wait for the relevant page condition before capturing.
The capture fails in an unattended environment The browser may not be installed or executable in that runtime, or the page may fail to load there. Run Chromium in the same environment as the job, verify executable availability, and inspect the page load and runtime logs.

7. Performance, reliability, and operating cost

For occasional captures, a local headless browser avoids an additional screenshot-service request, but you need to provide and maintain a working browser environment. For scheduled or bulk jobs, account for browser startup, page loading, and the resources needed to run Chromium; the research sources provide no benchmark or fixed resource estimate. Capture only the viewport when a thumbnail is the goal, since full-page capture can create much larger images and involve more page content.

Reliability depends on the target page and the environment running the browser. A successful command does not guarantee that a page’s asynchronous content has finished rendering, so inspect outputs and use explicit waits when the capture must include late-loading content. The sources do not establish an India-specific hosting, legal, or cost requirement for this workflow.

8. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. Use one GET request to return a screenshot; see the ScreenshotNeo API documentation for options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
  • Cookie banners are accepted and removed before the shot; newsletter popups and chat widgets are also removed. Each cleanup step can be turned off.
  • Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers report the page verdict and whether the capture was billed.
  • An MCP server gives AI agents, including Claude and Cursor, tools to take screenshots, get page information, and capture PDFs.
  • The free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots.

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

9. Frequently asked questions

Is there a standard size for website thumbnails in India?

The sources reviewed establish no India-specific or universal thumbnail size. Choose dimensions based on the destination and the website layout you need to represent.

Does the basic command capture the whole page?

It captures a screenshot of the page viewport. Use a full-page-capable browser automation method when you need content beyond that viewport.

Should I make separate mobile and desktop thumbnails?

If the thumbnail needs to represent both layouts, capture each form factor with its own viewport. Responsive pages can render different compositions at narrow and wide widths.

Which Chromium installation command should I use in India?

There is no single command established for every Indian operating system or environment. Follow the installation instructions for the OS or distribution you use, then invoke the browser executable available there.