Use Puppeteer to open the URL in a Chromium page, set the viewport to the thumbnail dimensions, wait for the page to become ready, then save page.screenshot(). A normal screenshot captures the visible viewport; use fullPage: true only when you specifically want a long image of the whole page.
Make a thumbnail with Puppeteer
Install Puppeteer in a Node.js project, then run this script with a URL that includes its scheme, such as https://example.com. The viewport is set before navigation so responsive pages can render at the intended size.
As an Amazon Associate I earn from qualifying purchases.
-
Install Puppeteer:
npm install puppeteer. -
Save the following as
thumbnail.mjs. -
Run it with
node thumbnail.mjs https://example.com. Puppeteer writesthumbnail.pngin the current directory.Recommended: Fix Windows Errors and Clear Junk Files in Minutes - Free Scan →Recommended: Update Every Outdated Driver on Your PC in One Scan - Free →Recommended: PC Feels Slow? A Free Scan Shows What's Dragging Windows Down →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import puppeteer from 'puppeteer';
const url = process.argv[2];
if (!url) throw new Error('Pass a URL as the first argument');
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 720, deviceScaleFactor: 1 });
const response = await page.goto(url, {
waitUntil: 'networkidle2',
timeout: 30_000,
});
if (response && !response.ok()) {
throw new Error(`Page returned HTTP ${response.status()}`);
}
await page.screenshot({ path: 'thumbnail.png', type: 'png' });
} finally {
await browser.close();
}
The navigation wait uses networkidle2, an example in the Puppeteer screenshot guide, not a universal signal that every site has finished rendering. Sites with ongoing network traffic or delayed client-side rendering may need a page-specific readiness condition. Always close the browser in finally so an error does not leave the browser process running.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
Choose the kind of thumbnail
Viewport thumbnail
The example captures the 1280-by-720 viewport, a useful landscape preview shape. Set the width and height to match the space where the thumbnail will appear. The device scale factor controls pixel density: a value of 1 produces an image at the viewport dimensions, while a higher value produces more pixels. Set the viewport before navigation because responsive websites use it to choose their layout; changing it later can reload some pages. See Puppeteer’s viewport documentation.
Full-page image
For an image of the entire scrollable page, use fullPage: true:
await page.screenshot({ path: 'full-page.png', fullPage: true });
A full-page capture can be very tall, which usually makes it less suitable for a compact preview. Puppeteer documents fullPage and other screenshot settings in the screenshot options reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Capture one element
If the thumbnail should show a particular card, hero, or other element rather than the viewport, locate it and capture its bounding element:
const element = await page.$('.hero-card');
if (!element) throw new Error('Could not find .hero-card');
await element.screenshot({ path: 'hero-card.png' });
Replace .hero-card with a selector present on the target page. Puppeteer’s screenshot guide covers ElementHandle.screenshot() alongside page screenshots.
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
Format and output options
Page.screenshot() supports a file path, image type, quality, clipping region, full-page capture, and transparent background. The file extension can determine the format if a path is supplied; choosing type explicitly makes the intent clear. Quality applies to lossy image formats, not PNG. Consult the API reference for the supported options and combinations.
-
PNG: use for a lossless capture; the
qualityoption does not apply.Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
JPEG or WebP: use when a smaller lossy image is suitable; set a supported quality value for the selected type.
-
Clip: use a rectangle when only a defined portion of the viewport is needed.
-
Transparent background:
omitBackground: trueomits the default background where transparency is supported.Rank #3
SaleNexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Wait for the page state you need
page.goto() returning means the selected navigation condition was met, not necessarily that a particular image, app widget, or delayed render is ready. networkidle2 can be unsuitable for sites that keep requests open or load content after navigation. When you know what the thumbnail depends on, wait for that specific element or readiness signal before capturing:
Recommended Free Tools
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30_000 });
await page.waitForSelector('.thumbnail-content', { timeout: 10_000 });
await page.screenshot({ path: 'thumbnail.png' });
Use a selector that actually indicates the desired content is ready. A fixed delay is another option for a site whose rendering behavior you understand, but it can waste time or still be too short if the site is variable. Lazy-loaded content may require an explicit page-specific step to load it; there is no universal lazy-load recipe here.
Check HTTP status and navigation failures
Inspect the response when you need to distinguish a successful page from an HTTP error. Puppeteer’s page.goto() returns the main-resource response, or null for special cases such as about:blank. In headless shell mode, HTTP statuses such as 404 and 500 do not necessarily make navigation throw, so check response.status() or response.ok() yourself. See the Page.goto() API reference.
Troubleshooting
-
“Pass a URL as the first argument”: include a URL after the script name, for example
node thumbnail.mjs https://example.com. -
Navigation times out: the site may be slow or keep network activity open. Try a more appropriate navigation condition, then wait for a specific selector or readiness signal with a separate bounded timeout.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #4
SaleEMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera | USB Type-A & A-to-C Adapter, Fixed Focus, Plug&Play for Zoom/Teams/Facetime/YouTube/Google Meet/Switch 2 Camera, 2025 Version- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
-
The image is blank or incomplete: navigation may have finished before the relevant client-side content appeared. Wait for a page-specific element and confirm that it is visible before capture.
-
The script does not report a navigation error, but the page is an error page: inspect the returned response status; valid HTTP error responses do not always reject navigation.
-
The layout is wrong for the thumbnail: set the intended width and height before
goto(), and verify the chosen dimensions against the page’s responsive breakpoints. -
The screenshot is unexpectedly tall: remove
fullPage: trueunless a full-document capture is required.Free tools Windows power users keep installed
One-click scans. No signup required.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Browser processes remain after a failed capture: ensure the capture is enclosed in
try/finallyand callbrowser.close()from thefinallyblock.Best Value
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black | 30fps Video, Clear Audio, Light Correction, Works with Teams, Meet, Zoom, Nintendo Switch 2, Mac, Tablet- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
Performance, reliability, and safe URL handling
Each capture launches or uses a browser, navigates to a remote site, and waits for the selected readiness condition. A narrower, page-specific wait can avoid waiting for unrelated network activity, but should still allow enough time for the content your thumbnail needs. Bound navigation and selector waits so a slow or unusual page cannot hold a job indefinitely.
If you turn this script into a service that accepts arbitrary user URLs, browser navigation can contact destinations beyond the requested document. Treat URL validation, network egress restrictions, resource and time limits, and browser isolation as production security requirements. The Puppeteer API references cited above document capture and navigation behavior, not a complete defense against server-side request forgery; design those controls separately.
Or skip the browser setup
ScreenshotNeo provides a screenshot API that returns an image or PDF from one GET request. Example using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for API details. It accepts cookie and consent banners as a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. ScreenshotNeo also has an MCP server with screenshot, page-info, and PDF-capture tools for AI agents. The free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. Sign up free for 1,000 screenshots a month, no card required.
Frequently Asked Questions
Does Puppeteer capture the whole page by default?
No. A standard page screenshot captures the viewport; set fullPage: true for the scrollable page.
Can I capture a page element instead of the viewport?
Yes. Find the element and call ElementHandle.screenshot() to save its image.
Quick Recap
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.




