To control how a webpage renders in a Puppeteer screenshot from n8n, set the viewport before navigating: call page.setViewport({ width, height, deviceScaleFactor }), then open the URL and capture it. The viewport width and height are measured in CSS pixels; device scale factor controls the output pixel density. Which implementation works depends on whether you use n8n Cloud or self-hosted n8n.
Set the viewport in Puppeteer before opening the page
For a Puppeteer capture, create a page, set its viewport, navigate to the target, wait for any content your workflow needs, and take the screenshot. Setting the viewport first gives the site the intended dimensions when it chooses its responsive layout. Puppeteer recommends setting the viewport before navigation because some sites respond to phone-sized viewports differently. See the Puppeteer Page.setViewport() API reference.
As an Amazon Associate I earn from qualifying purchases.
const page = await browser.newPage();
await page.setViewport({
width: 1440,
height: 900,
deviceScaleFactor: 1,
});
await page.goto(url);
await page.screenshot({ path: '/tmp/page.png', fullPage: false });
Replace url with the page URL available in your workflow. Here, the viewport is 1440 by 900 CSS pixels and the scale factor is 1. Use fullPage: false for a screenshot of the visible viewport. A full-page capture is a separate choice and may produce a much taller image; it does not change the initial viewport dimensions.
Choose dimensions and pixel density
widthandheight: set the browser page area’s dimensions in CSS pixels. Choose them to match the layout or breakpoint you need to inspect.deviceScaleFactor: controls the relationship between CSS pixels and device pixels in the capture. Keep it at1for a straightforward one-to-one scale, or change it when output pixel density matters.- Full page versus viewport: use a viewport-sized capture for what is visible in the browser area; use a full-page option when you need content below the fold. The html2image community node documents full-page capture separately from viewport settings.
Choose an n8n implementation that fits your hosting
The main decision is whether your n8n environment can run Puppeteer and access a compatible browser. n8n’s Code node documentation says self-hosted installations can import external npm modules when configured to allow them, while n8n Cloud does not allow external npm module imports. Do not assume a Puppeteer import example will run unchanged in every n8n deployment.
#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
| Approach | Best fit | Viewport control | What to check |
|---|---|---|---|
| Puppeteer in a Code node | Self-hosted n8n where external modules and a compatible browser are available | Direct control with page.setViewport() |
Module configuration, browser installation, and task-runner environment |
n8n-nodes-html2image community node |
Workflows where a node interface is preferable to custom Puppeteer code | Documented Viewport width and height fields | Current maintenance and compatibility; Docker deployments need Puppeteer installed in the image |
n8n-nodes-getscreenshot community node |
Workflows using its hosted GetScreenshot API integration | README lists custom width, height, device scale factor, and device presets | It requires a GetScreenshot API key; review current service terms and data handling |
Puppeteer in a Code node
Use the direct Puppeteer method when your deployment supports the external package and browser runtime. It gives you explicit control over when the viewport is set and what capture options are passed. Self-hosted support for external npm modules is a configuration capability, not a guarantee that a particular task runner already has Puppeteer or a compatible Chrome/Chromium browser available.
An n8n repository issue includes a user’s example calling page.setViewport({width: 1280, height: 768}) before navigation, but the same report describes an import failure in that user’s n8n v2 external task-runner environment. Treat it as a setup-specific warning rather than evidence that all task runners fail. See n8n issue #26926.
Puppeteer-based community node
The n8n-nodes-html2image README documents a Viewport setting in pixels with width and height. It also lists screenshot controls including CSS selector, image type, quality, and Full Page. The README describes installation through n8n’s community-node interface on supported versions and notes that Docker deployments need Puppeteer installed in the image. Check the node’s current compatibility and maintenance before depending on it in a production workflow.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →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.
This is the most direct option if you specifically want to enter custom width and height in a node’s interface. Resizing the resulting image later is not equivalent: resize changes the image dimensions, whereas viewport settings influence the page layout selected during rendering.
Hosted screenshot API node
The n8n-nodes-getscreenshot README describes a community node integrating the GetScreenshot API. It lists custom width and height, device scale factor, device presets, output formats, and timing controls; it requires a GetScreenshot API key and describes binary screenshot output with dimensions and capture status in the API response.
A hosted capture service can reduce the need to manage a browser runtime, but it introduces an outside service dependency. Check the provider’s current terms and how it handles target-page data before sending URLs or page content through it. Pricing, retention terms, and service-level commitments are not established here.
Rank #3
- 【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.
Use ScreenshotNeo to avoid managing a browser
If you want to set a custom viewport without installing or configuring Puppeteer in n8n, ScreenshotNeo is a hosted screenshot API with device presets and arbitrary viewport options. Its website screenshot API can return an image or PDF from a GET request. The example below uses a 1440-by-900 viewport; see the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://stripe.com
-d width=1440
-d height=900
-o shot.webp
In n8n, use an HTTP Request node to make the GET request to https://api.screenshotneo.com/v1/shot, pass your access key and target URL as query parameters, and set the width and height parameters to the desired dimensions. Configure the node to retain the response as a file/binary value if the next step needs the screenshot itself. Adjust the output format and any other capture settings using the API documentation.
- ScreenshotNeo accepts cookie/consent banners as a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off.
- Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify page verdict and billing status in headers.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Every feature is available on every plan.
Sign up for ScreenshotNeo free to get 1,000 screenshots a month without a card.
Rank #4
- 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)
Troubleshoot viewport and screenshot problems
The page uses the wrong responsive layout
Confirm that page.setViewport() runs before page.goto(), and check the width and height values passed to it. Changing the image size after capture will not cause the page to render at a different breakpoint.
The Puppeteer import fails in a Code node
Check your hosting type first: n8n Cloud does not allow external npm module imports in the Code node. For self-hosted n8n, verify the release’s module configuration and the environment where the code actually runs, including any task runner. A single user’s reported import failure in n8n v2 does not establish that every setup is affected.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Puppeteer cannot launch or find a browser
The capture requires a compatible Chrome or Chromium browser as well as the Puppeteer package. On self-hosted deployments, verify that the browser is installed and accessible to the process or task runner executing the code. For the html2image community node, its README specifically notes the need to install Puppeteer in Docker images.
Best Value
- 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
The screenshot is cropped or unexpectedly tall
Check whether the workflow requests a viewport-sized capture or a full-page capture. These are distinct capture behaviors: viewport dimensions set the browser’s page area, while full-page capture includes content beyond that area. Also check the node’s own Full Page setting if using a community node.
A remote browser connection does not work
An n8n issue includes a user’s example connecting Puppeteer to a Browserless WebSocket endpoint. That is a reported pattern, not a compatibility guarantee. Confirm the remote browser provider’s current connection requirements and that your n8n runtime can reach the endpoint. See the issue example.
Reliability, performance, and cost considerations
A custom viewport determines the responsive layout and capture dimensions; it does not by itself guarantee that images, client-rendered content, or other delayed elements have finished loading. If the page needs extra time or a particular element to appear, configure an appropriate wait in the node or capture workflow before taking the screenshot.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteDirect Puppeteer provides browser-level control but makes the browser package, browser binary, and runtime configuration your responsibility. A community node exposes only the controls its interface supports and adds a third-party dependency. A hosted API can avoid local browser setup, but places capture execution and target-page data handling with an external provider; evaluate current terms, access controls, and service behavior before using it for sensitive pages. No comparative speed or reliability measurements are established here.
Frequently Asked Questions
Does changing the viewport resize an image after capture?
No. The viewport affects how the page is rendered; resizing changes the already captured image.
Can I set a custom viewport in n8n Cloud’s Code node with Puppeteer?
The n8n Code node documentation says Cloud does not allow importing external npm modules, so do not assume a direct Puppeteer import will work there.
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.




