Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Playwright

How to Capture an HTML Link as a PNG

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

To capture an HTML link as a PNG, open the link’s destination page in a browser and save a screenshot of the rendered page. The link is an address, not an image: what you capture is the page it opens. For repeatable captures, Playwright can navigate to the destination and save a screenshot as a PNG file.

What “capture an HTML link” means

An HTML link—usually an anchor such as <a href="https://example.com">Visit example</a>—points to a destination. Its visible text is not the webpage, and the link’s HTML does not contain a screenshot. To make an image, open the destination and capture what the browser renders.

Before capturing, decide what you need:

  • Viewport: only the part visible in the browser window.
  • Full page: the page from top to bottom in one tall image.
  • Element: one specific item, such as a chart, article card, or product image.

These choices affect the result. A full-page image may be very tall, while a viewport image may omit content below the fold. If you need evidence of a specific item, capturing that element can avoid unrelated page content.

Capture it manually in a browser

For a one-off image, follow the link, wait until the page looks the way you want, and use your browser or operating system’s screenshot feature. Save or export the result as PNG. The exact menu names and shortcuts depend on your browser and operating system; the reliable part of the workflow is opening the destination first and choosing PNG in the capture or export interface when that option is available.

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.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  1. Open the page containing the link.
  2. Follow the link to its destination. If you need the exact address first, use the browser’s link menu to copy it, then paste it into the address bar.
  3. Wait for the content you want to show to appear. Scroll to frame the relevant section if you are taking a viewport capture.
  4. Take a screenshot using the browser or operating system’s capture feature.
  5. Save or export the image as .png. If the capture tool saves a different format, use its export or conversion option rather than merely changing the filename extension.

A browser screenshot captures the rendered page, including its visible styling and loaded content. It does not preserve the link as a clickable link inside the image. If you need a clickable reference as well, keep the URL separately or share it alongside the PNG.

Automate PNG captures with Playwright

For repeated captures, Playwright can open a URL in a browser and write a screenshot file. Its documentation shows the basic page.screenshot({ path: 'screenshot.png' }) pattern; the filename extension can determine the output type. See Playwright’s screenshot guide and Page API reference.

Install Playwright

The following example uses Node.js and Chromium. In a new project directory, install Playwright and its browser:

npm init -y
npm install playwright
npx playwright install chromium

Capture the destination as a PNG

Save this as capture.js. Replace the URL with the destination of your HTML link, then run node capture.js.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const { chromium } = require('playwright');

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

  try {
    await page.goto('https://example.com', {
      waitUntil: 'domcontentloaded',
      timeout: 30000
    });

    await page.screenshot({ path: 'screenshot.png' });
  } finally {
    await browser.close();
  }
})();

domcontentloaded waits for the initial HTML document to be parsed, not for every image, font, animation, or application request to finish. That is a deliberate starting point rather than a guarantee that every page is visually ready. For a dynamic page, wait for the particular content that matters before taking the screenshot:

await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
await page.locator('.report-ready').waitFor({ state: 'visible', timeout: 15000 });
await page.screenshot({ path: 'report.png' });

Replace .report-ready with a selector that identifies the actual content on the destination. A site may render different content or use different selectors, so there is no single readiness wait that fits every page. If a page has no useful stable element, use a deliberate delay only as a fallback and allow enough time for the expected content to appear.

Full-page and element captures

Set fullPage: true to capture the full scrollable page as one image:

await page.screenshot({ path: 'full-page.png', fullPage: true });

Playwright describes a full-page screenshot as a capture of the full scrollable page rendered as if it fit on a very tall screen. This can produce a large, tall image; for a long page, check whether that is easier to read than several viewport captures. Source: Playwright Screenshots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

To capture one element instead of the whole page, target it with a locator:

await page.locator('.price-chart').screenshot({ path: 'chart.png' });

Use a selector that matches the element you want. If the selector matches nothing, or the target is hidden, the capture cannot produce the intended element image. The Playwright screenshot guide documents both full-page and element screenshots: Screenshots.

Choose image type and resolution

A .png path requests a PNG screenshot in the documented Playwright workflow. The API also supports JPEG and WebP, with the screenshot type inferred from the filename extension when the type is not specified. PNG is suitable when that is the required deliverable; JPEG or WebP may be preferable when smaller files matter more than a lossless image. See Playwright’s Page API.

Playwright distinguishes CSS-pixel sizing from device-pixel sizing. CSS scale aims for one screenshot pixel per CSS pixel; device scale can create a higher-resolution image. Choose based on the image’s intended use: a larger device-scale output can help legibility, but it also increases image dimensions and file size. The API reference documents the scale choices and screenshot options at Page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server for developers. It can return PNG, JPEG, WebP, or PDF; use its documentation to select the requested output format. These one-request examples follow the published API pattern and save the response as WebP, as indicated by the filename.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Read the ScreenshotNeo API documentation for output-format selection and the other request options. ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those cleanup steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Plans include 1,000 screenshots per month free with no card, Starter at $5 for 3,000, Growth at $15 for 15,000, Pro at $39 for 60,000, Scale at $99 for 250,000, and Business at $249 for 1,000,000; yearly billing gives two months free. Every feature is available on every plan. Sign up for 1,000 free screenshots a month with no card.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

The image is blank or shows a loading state

Navigation completing does not necessarily mean the page’s useful content has rendered. Wait for a visible, page-specific selector, as in the Playwright example, before capturing. Check that the selector exists on this destination and that it becomes visible in the browser.

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

The screenshot misses content lower on the page

A standard page screenshot captures the current viewport. Use fullPage: true for a tall capture of the scrollable page, or scroll and take multiple viewport images if a single very tall image would be awkward to inspect.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

The element screenshot fails or captures the wrong item

Verify that the selector targets the intended element on the destination page. A selector copied from another page, or one that matches multiple elements, may not identify the desired item. Check the rendered page and use a more specific selector before retrying.

The saved file is not a PNG

Check the screenshot type and the file’s actual format. In Playwright, use a .png output path for PNG; with other tools, choose PNG in their format setting. Renaming a JPEG or WebP file to end in .png does not convert its contents.

Playwright cannot launch its browser

Install the browser binary required by the project with npx playwright install chromium. If your environment runs another browser or restricts browser processes, check Playwright’s installation requirements and use a browser available in that environment.

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

Practical considerations for repeat captures

  • Use the same viewport: A page can reflow at different widths, changing line breaks and layout. Set a fixed viewport when you need comparable captures.
  • Wait for the content, not just navigation: Client-rendered pages can continue changing after the initial document loads. Prefer an element-based readiness check when the target is identifiable.
  • Consider page length and image size: Full-page captures are convenient, but long pages can create unwieldy images. An element or viewport capture may be more useful for sharing or review.
  • Keep the address and output together: For a repeatable workflow, record the destination URL, viewport, and capture choice along with the PNG. These details help explain why a later screenshot differs.
  • Account for access controls: A browser can only capture the page state it can reach. If the destination requires a login or other interaction, the automated browser needs the appropriate authenticated state and the necessary steps before capture.

Frequently Asked Questions

Does a PNG screenshot keep the page’s links clickable?

No. PNG is a static image; share the destination URL separately if readers need to open the page.

Can I capture a page that is still changing?

You can, but the image records only the state visible at the instant of capture. For dynamic content, choose a stable point in the page’s lifecycle before taking it.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.