Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

How to Prevent Chrome Headless from Loading Images

Stop Puppeteer’s headless Chrome from downloading images with a narrow request-interception rule, while keeping other page resources available.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To stop headless Chrome from downloading images, intercept network requests in Puppeteer and abort requests whose resource type is image. Continue every other request so stylesheets, fonts, scripts, and page data still load. Headless mode itself does not block images.

Block image requests in Puppeteer

Enable interception before navigating, then check each request’s resource type. Abort image requests and continue all others:

const page = await browser.newPage();

await page.setRequestInterception(true);
page.on('request', request => {
  if (request.resourceType() === 'image') {
    return request.abort();
  }
  return request.continue();
});

await page.goto('https://example.com');

This is the image-only adaptation of Chrome’s documented Puppeteer interception pattern: the browser can modify or stop requests before they are issued. Check the API documentation for the Puppeteer version installed in your project, since the cited Chrome example is older and does not establish a current version number.

What this changes

  • Requests that Puppeteer identifies as images are aborted before their content is downloaded.
  • Other requests continue, preserving the page’s ordinary loading behavior for resources such as CSS, JavaScript, fonts, and media.
  • The page may show empty image areas or broken-image indicators. The page’s own scripts may also react to failed image requests.

Set the interception listener before page.goto(); otherwise, requests made during navigation could start before the policy is in place. If your code already has a request listener, combine the filtering logic with it rather than registering competing handlers that may both try to resolve the same request.

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

Image-only filtering or a resource allowlist?

Approach What continues Trade-off
Abort only image requests All requests except those classified as images Closest match when the goal is specifically to avoid image downloads.
Allow only selected resource types Only the types you name, for example document, script, xhr, and fetch Also blocks unlisted resources, which can include stylesheets, fonts, and media; page appearance or behavior may change.

Chrome’s server-side-rendering example uses the allowlist approach. Choose it only when you intend to suppress those additional resource types. Neither approach has a documented fixed speedup: avoiding image downloads can reduce bandwidth and work, but the effect depends on the page and workload.

Why Headless Chrome still loads images

Headless describes running a browser without a visible user interface; it is not an image-blocking setting. Chrome’s current unified Headless mode shares code with Chrome, so resource filtering belongs in your automation’s network policy. See Chrome’s Headless mode documentation.

Chrome 112 introduced unified Headless. Starting with Chrome 132.0.6793.0, the older Headless implementation is available as a separate chrome-headless-shell binary. These are version markers for the browser modes, not a requirement to change modes to block images.

Troubleshooting

Images still appear

  • Confirm interception is enabled and the listener is registered before navigation.
  • Check that the listener is attached to the same Puppeteer page being navigated.
  • Verify the request classification in your installed Puppeteer environment; the filter applies to requests reported as resource type image.
  • If page code inserts images after navigation, ensure the listener remains active for the page’s lifetime.

The page looks unstyled or stops working

Check whether your code uses a resource allowlist. An allowlist that omits stylesheet, fonts, or other needed types blocks them too. For image suppression alone, use the narrow request.resourceType() === 'image' condition and continue all other requests.

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

Navigation reports failed requests

Aborted image requests are intentionally unsuccessful. If your workflow treats any failed request as a page failure, distinguish expected image aborts from document or script failures in your own request/error handling.

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

Or skip the browser setup

If you need a screenshot rather than a custom Puppeteer workflow, ScreenshotNeo is a website screenshot API and MCP server. Its capture process accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server offers screenshot and page-information tools for AI agents.

One GET request returns an image or PDF. Example cURL call (replace the target URL and use your API key):

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

See the ScreenshotNeo API documentation for request options. Plans include 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

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.

Sources

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
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.