Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a website as a JPEG, use a browser automation tool such as Playwright and set the screenshot type to jpeg; use fullPage: true if you need the entire scrollable page rather than the visible viewport. For a hosted website screenshot API, send the page URL and request JPEG output. The right method depends on whether you want control over the browser or prefer not to run one yourself.

Capture a website as JPEG with Playwright

Playwright can render a page in Chromium and save the result as JPEG. The example below uses Node.js, fixes the viewport at 1440 by 900 pixels, waits for network activity to settle, and captures the full page at JPEG quality 80. Playwright documents JPEG output, the quality range, and full-page capture in its Page screenshot API.

import { chromium } from 'playwright';

const browser = await chromium.launch();
try {
  const page = await browser.newPage({
    viewport: { width: 1440, height: 900 }
  });

  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  await page.screenshot({
    path: 'example.jpeg',
    type: 'jpeg',
    quality: 80,
    fullPage: true
  });
} finally {
  await browser.close();
}

Install Playwright and its Chromium browser before running the script:

npm init -y
npm install playwright
npx playwright install chromium

Save the script as screenshot.mjs and run node screenshot.mjs. The output file will be example.jpeg in the current directory. The browser is closed even if navigation or capture throws an error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

Equivalent Python implementation

Playwright also provides a synchronous Python API. Install the package and browser, then run this script:

python -m pip install playwright
python -m playwright install chromium
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    try:
        page = browser.new_page(viewport={"width": 1440, "height": 900})
        page.goto("https://example.com", wait_until="networkidle")
        page.screenshot(
            path="example.jpeg",
            type="jpeg",
            quality=80,
            full_page=True,
        )
    finally:
        browser.close()

Choose viewport or full-page capture

A normal screenshot captures the visible viewport. That is often best for a thumbnail, above-the-fold preview, or visual check of a particular screen size. Full-page capture asks Playwright to capture the page’s full scrollable document in one image; it can create a very tall file on long pages.

  • fullPage: false (the default) captures only the viewport.
  • fullPage: true captures the full scrollable page.
  • In the Playwright CLI, the corresponding option is --full-page.

For a consistent comparison across runs, set an explicit viewport rather than relying on an environment-dependent default. A fixed viewport makes responsive layouts more predictable, but it does not guarantee that dynamic content, animations, or third-party resources will render identically each time.

Set JPEG quality and understand the trade-offs

Playwright’s JPEG quality option accepts values from 0 to 100, and its documented default is 80. Lower quality generally makes a smaller file at the cost of more visible compression; higher quality retains more image detail and can increase file size. Choose a value by considering how the image will be used, and check the resulting output rather than assuming a particular byte size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.

JPEG does not support transparency. Playwright’s omitBackground option is therefore not applicable to JPEG output. If the captured asset must retain a transparent background, use PNG instead. See Playwright’s screenshot option reference for the supported parameters.

Wait for the page state your capture needs

The example uses waitUntil: 'networkidle', which is one way to wait for network activity to settle before capture. It is not a universal readiness test: sites may keep requests open, load key content later, or animate after network activity ends. Choose a wait condition that matches the page and workflow, and use the browser controls documented by Playwright when you need a more specific rendering or timeout strategy.

For reliable captures, consider whether the page depends on authentication, custom headers, delayed content, or interactions. A screenshot taken before the intended content appears can be technically successful yet visually incomplete. Avoid treating a fixed delay as proof that every site is ready; the appropriate wait depends on how that site renders.

Use a hosted website screenshot API

A hosted API is useful when you do not want to install and operate a browser runtime for each capture. Instead of launching Chromium yourself, your application sends a URL to a service over HTTP and receives an image response. Confirm that the service supports the output format and capture controls your workflow needs, including full-page capture and any required delay or caching behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

ScreenshotAPI documents a screenshot operation that supports JPEG among its image formats in its API documentation. ShotPilot documents a GET screenshot endpoint, JPEG output, a post-network-idle delay option, and cache controls in its API documentation. Those documented capabilities do not establish which service is faster or cheaper for a particular workload; the cited documentation does not provide a cross-provider performance or price benchmark.

ScreenshotNeo: a hosted API with a one-request capture

ScreenshotNeo is a website screenshot API and MCP server for developers. Its endpoint returns a screenshot or PDF from a URL; its formats include PNG, JPEG, and WebP. The following cURL request saves a JPEG capture of the example URL:

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.jpeg

See the ScreenshotNeo API documentation for request parameters and setup. Replace YOUR_API_KEY with your API key. Because this is an HTTP request, your application does not need to launch a local browser for this capture.

Python request

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://example.com",
        "format": "jpeg",
    },
    timeout=90,
)
r.raise_for_status()
with open("shot.jpeg", "wb") as image:
    image.write(r.content)

Node.js request

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

Keep API credentials private: do not place a key in browser code or a public repository. For production, read it from a secret or environment variable and handle HTTP errors before treating a response as an image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

When to use a browser you control or an API

Consideration Playwright on your infrastructure Hosted screenshot API
Browser/runtime control You choose and operate the browser runtime and capture script. The provider operates the capture service; check its documented controls.
Operational work Install browsers, run capture workers, and maintain the environment. Make HTTP requests instead of running a browser for each capture.
Authentication and headers Implement the browser setup and page context needed by your site. Check the provider’s parameter documentation for the required controls.
Capture scope Playwright documents viewport and full-page screenshots. Verify that the API supports the full-page or element capture your use case needs.
Cost and throughput Account for your own compute and maintenance; no comparable per-request figure is established here. Compare current plan terms and test your workload; no cross-provider price or performance benchmark is established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common JPEG capture problems

The output is not a JPEG

For Playwright, explicitly set type: 'jpeg' and use a .jpeg output filename. The CLI can select the format with --type=jpeg; Playwright can also infer the format from a .jpeg filename. For an API, use the format parameter documented by that provider, since parameter names are not universal.

The image cuts off below the fold

That is expected for a viewport screenshot. Set fullPage: true in the Playwright API or use the CLI’s --full-page option. With a hosted service, check its documentation for full-page support.

The page is blank or missing late content

The capture may have happened before the relevant content rendered, or the site may have failed to load it. Check navigation errors and choose a wait condition tied to the page’s actual behavior. A generic network-idle wait will not solve every delayed-rendering case.

The result has no transparent background

That is a JPEG limitation, not a capture error. Use PNG if transparency is required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

The file is larger than expected

Reduce the JPEG quality setting from its documented default of 80, or capture only the viewport instead of a long full page. Check the visual result after changing quality, since stronger compression can reduce image fidelity.

The hosted request fails

Check that the URL is encoded correctly, the API key is valid, the requested format is accepted, and the HTTP status indicates success before writing response bytes as an image. For ScreenshotNeo, consult the API documentation for parameter and response details.

Or skip the browser setup

With ScreenshotNeo, one GET request can return a JPEG capture. Cookie and consent banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and its free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. See the API documentation for available options.

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.jpeg

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can I save a Playwright screenshot as JPG instead of JPEG?

Yes. JPG and JPEG are common filename extensions for the same image format; Playwright’s documented screenshot type is jpeg.

Does JPEG preserve transparent pixels?

No. JPEG has no transparency channel; use PNG when the background must remain transparent.

Can a screenshot API return an image directly over HTTP?

Yes. ScreenshotAPI documents JPEG as a supported screenshot format, and ShotPilot documents JPEG responses using image/jpeg.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.