To turn a long HTML page into JPEG tiles, render it in a real browser, capture either the whole page or defined page regions, then crop or assemble the returned image buffer. In Playwright, page.screenshot({ type: 'jpeg', fullPage: true, quality: 80 }) produces one full-page JPEG—not a set of fixed-size tiles. This guide shows both approaches and how to choose between them.
What “full page” capture does—and does not—mean
A browser automation library first renders the HTML, including its layout and visual state, and then captures pixels. The result reflects the rendered page, not a direct conversion of the HTML source code. Playwright’s fullPage: true captures the scrollable page as one tall image. To deliver separate tiles, you must capture page rectangles individually or crop a full-page image after capture.
The official documentation describes full-page capture and buffer output, but does not define a standard tile size, overlap, stitching order, seam treatment, or universal maximum image dimensions. Choose those details for your output requirements and validate them with your browser and image-processing stack.
Capture a full-page JPEG with Playwright
This Node.js example loads an HTML file, waits for page content to settle, captures one full-page JPEG into a buffer, and writes it to disk. Playwright documents page.setContent, the screenshot options, and buffer output for post-processing. See the Playwright Page API and Playwright screenshots guide.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
import { chromium } from 'playwright';
import { readFile, writeFile } from 'node:fs/promises';
const html = await readFile('page.html', 'utf8');
const browser = await chromium.launch();
try {
const page = await browser.newPage({ viewport: { width: 1280, height: 900 } });
await page.setContent(html, { waitUntil: 'networkidle' });
const jpeg = await page.screenshot({
type: 'jpeg',
fullPage: true,
quality: 80,
scale: 'css'
});
await writeFile('page.jpg', jpeg);
} finally {
await browser.close();
}
For a live page, replace page.setContent with await page.goto('https://example.com', { waitUntil: 'networkidle' }). For production use, handle navigation errors and ensure the page is in the intended state before capturing; network idle is not a guarantee that every application-specific animation or delayed widget has finished.
Relevant Playwright options
fullPage: truecaptures the full scrollable page in one image.type: 'jpeg'selects JPEG output. Playwright also documents PNG and WebP.qualitysets JPEG quality from 0 to 100; the documented default is 80. Higher quality can increase output size.scale: 'css'keeps output at CSS-pixel dimensions.scale: 'device'uses device pixels and may create a larger image.clipcan be used when you want a defined rectangle instead of the whole page.
JPEG does not support transparency; Playwright’s omitBackground option description notes this limitation. If transparent output matters, choose a supported format such as PNG instead.
Make separate JPEG tiles
There are two practical strategies. Capturing rectangles directly avoids first creating one very tall intermediate image. Capturing once and cropping afterward can simplify consistency, but requires the full-page buffer to be produced successfully. Neither approach has a universally documented safe dimension limit; test representative pages in your actual environment.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Option 1: capture page regions with clips
For predictable content with known dimensions, capture consecutive rectangles using clip. The coordinates are page pixels in the browser’s screenshot coordinate system, so ensure your tile dimensions and scale choice agree. This example captures two adjacent 1,200-pixel-high regions from a page known to be at least 2,400 pixels tall:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11import { chromium } from 'playwright';
import { writeFile } from 'node:fs/promises';
const browser = await chromium.launch();
try {
const page = await browser.newPage({ viewport: { width: 1200, height: 900 } });
await page.goto('https://example.com', { waitUntil: 'networkidle' });
for (let i = 0; i < 2; i++) {
const jpeg = await page.screenshot({
type: 'jpeg',
quality: 80,
scale: 'css',
clip: { x: 0, y: i * 1200, width: 1200, height: 1200 }
});
await writeFile(`tile-${i + 1}.jpg`, jpeg);
}
} finally {
await browser.close();
}
This fixed example assumes the page is tall enough and that its content is ready. For a general implementation, derive the page height, calculate the number of tiles, and make the final clip no taller than the remaining content. If the page has lazy-loaded images, scroll through it or otherwise trigger loading before taking region captures; validate that content is present in each tile.
Option 2: crop a full-page buffer
Capture a full-page buffer as shown above, then pass it to an image-processing library that supports JPEG cropping. Set the crop rectangles to the desired tile width and height, and account for the actual captured image dimensions. A CSS-pixel coordinate may not equal an output-image pixel when using device scale, so inspect the buffer dimensions rather than assuming a one-to-one mapping.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
If adjacent tiles must join into a continuous image, define a consistent order and coordinate system, and consider a small overlap to make seam checks easier. Overlap and seam handling are implementation choices, not prescribed by the browser screenshot APIs. Verify alignment on pages with sticky headers, animations, and content that changes during capture.
Choose between Playwright and Puppeteer
| Need | Playwright | Puppeteer |
|---|---|---|
| Full-page capture | Documented with fullPage in the Page API. |
Documented in ScreenshotOptions. |
| JPEG quality and format controls | JPEG output and configurable quality from 0 to 100 are documented; the default is 80. | ScreenshotOptions documents type and quality; consult the installed version’s documentation for option behavior. |
| Defined capture area | Screenshot clipping is available. | clip and captureBeyondViewport are documented. |
| Creating tiles | Use repeated region captures or post-process the screenshot buffer. | Use the documented capture controls or post-process output; tile sizing and assembly remain application logic. |
The Puppeteer ScreenshotOptions page displayed version 25.12.0 when accessed on October 3, 2026. Check the documentation for the version actually installed before relying on a default or option combination: Puppeteer ScreenshotOptions. The cited API documentation does not establish a performance winner between Playwright and Puppeteer.
Practical checks before generating tiles
- Wait for the intended visual state. Navigation completion may not wait for application-specific rendering, transitions, or delayed content. Wait for a meaningful selector or other application-specific readiness condition when needed.
- Load lazy content. A full-page screenshot is not proof that every image below the fold was fetched. Scroll through the page or trigger its loading behavior, then confirm the captured image.
- Keep dimensions consistent. Fix the viewport, scale, tile width, and tile height for the run. Reconcile CSS coordinates with output pixels when device scale is used.
- Control dynamic content. Ads, rotating banners, timestamps, and animations can change between tile captures and create visible discontinuities. Disable or wait for changing elements when the page permits.
- Budget for image size and memory. A long full-page image can be large, and the docs do not promise a universal maximum dimension or memory bound. Test the longest expected pages and prefer region capture if a full-page buffer is too large for your environment.
- Use an appropriate format. JPEG is useful for photographic content but is lossy and has no transparency. For sharp interface text and transparent backgrounds, compare PNG output against your quality and file-size needs.
Troubleshooting
The result is one tall image, not tiles
fullPage: true requests a full-page capture; it does not split the image. Capture separate clip rectangles or crop the resulting buffer with an image library.
Lower-page images are missing
The page may lazy-load images only when they approach the viewport. Scroll through the page before capture, wait for relevant images or selectors, and verify the resulting tiles rather than assuming navigation idle loaded everything.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Tiles do not line up
Check that every capture uses the same viewport and scale, that rectangle coordinates use the same pixel system as the image, and that the page did not shift between captures. Sticky elements and dynamic content may repeat or move at tile boundaries.
A tile is blank or clipped unexpectedly
Confirm that the requested rectangle lies within the rendered page and has positive width and height. Check whether the page finished rendering and whether a clipping or scale setting changed the coordinate interpretation.
Recommended Free Tools
JPEG output has no transparent background
That is a format limitation. Use PNG if transparency is required; JPEG is not transparency-capable.
A very long capture fails
The cited browser documentation does not establish a universal maximum image dimension or a guaranteed memory-safe size. Reduce the capture area, use smaller region captures, or crop in stages, then validate against the longest pages your system must handle.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Or skip the browser setup
ScreenshotNeo is a screenshot API and MCP server. A single request captures a URL as PNG, JPEG, WebP, or PDF. For a JPEG, use the format=jpeg parameter; consult the ScreenshotNeo API documentation for supported parameters and response behavior.
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-d format=jpeg
-o shot.jpg
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. A screenshot API returns a capture, not a set of custom-sized tiles, so crop or split its image output if your deliverable requires separate files.
Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Can I save the full-page capture directly as a JPEG?
Yes. In Playwright, set type: 'jpeg' in page.screenshot; set quality if you want a value other than the documented default of 80.
Does fullPage: true create fixed-size tiles?
No. It creates one full-page image. Capture page regions or crop the returned buffer to create separate tile files.
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

