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

If html2canvas skips a CDN image, check the image’s final network response first. When the image is cross-origin, useCORS: true works only if the image server allows your page’s origin with an appropriate Access-Control-Allow-Origin response header. If you cannot configure the image server, use a controlled same-origin proxy. allowTaint: true is not a general fix for screenshots you need to export: a tainted canvas cannot be read back with APIs such as toDataURL().

Why html2canvas may omit a CDN image

A CDN URL is cross-origin when its origin—scheme, host, or port—differs from the page running html2canvas. For example, a page on https://app.example and an image served from https://cdn.example have different origins, even if both domains belong to the same organization.

html2canvas does not capture the browser’s already-rendered pixels as a literal screenshot. It reconstructs an image from the DOM and browser-accessible information. Browser canvas security rules therefore matter: drawing an unapproved cross-origin image can taint the canvas, preventing scripts from reading or exporting its pixels. html2canvas defaults to skipping images that would taint the canvas when allowTaint is false.

There are two practical remedies: configure the image response to allow your page’s origin and request it in CORS mode, or retrieve it through a controlled endpoint on your own origin. Neither option can conjure permission that the remote host has not granted.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
  • 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

Diagnose the failing image before changing options

  1. Find the exact image request. Open your browser’s developer tools, select the Network panel, and reload the page. Filter for images or search for the CDN hostname. Inspect the image’s final request after any redirects.
  2. Check the response. Confirm that the request succeeded, that the response is actually an image, and that the final response includes an Access-Control-Allow-Origin header permitting the origin of your page if you plan to use CORS. A redirect can send the browser to a different host, so checking only the original URL may miss the relevant response.
  3. Read the console. Look for a CORS policy error, a failed request, or another image-loading error. A missing image is not proof of a CORS problem: a wrong URL, authentication requirement, failed load, or capture that starts before the image loads can also explain it.
  4. Compare origins accurately. Compare the page origin with the final image origin, including scheme, hostname, and port. A different subdomain is a different origin.
  5. Surface html2canvas resource failures. Use its onError callback, where available in your installed version, alongside the Network panel. The callback can help identify a failed resource, but it does not override browser security.

Fix 1: Enable CORS when you control the image host

Ask the CDN or origin server to return an Access-Control-Allow-Origin value that permits the page’s origin. The browser must make the image request in CORS mode as well, which is what useCORS: true tells html2canvas to attempt.

const element = document.querySelector('#capture-area');

if (!element) {
  throw new Error('Capture target #capture-area was not found');
}

const canvas = await html2canvas(element, {
  useCORS: true,
  onError: (error) => {
    console.warn('html2canvas resource failed:', error.message);
  },
});

const png = canvas.toDataURL('image/png');

This example assumes html2canvas is already loaded and that the target element exists. The page can export the canvas only if every included cross-origin resource is served in a way that keeps the canvas readable. Verify the actual final image response rather than assuming the CDN’s general configuration covers every path or redirect.

Choose an appropriate CORS response

For public images, the server may allow the requesting site’s origin, or use a broader value only if that matches the host’s access policy. Do not treat a permissive header as a harmless client-side setting: it is a policy decision made by the server that serves the image. If the image requires credentials, confirm that the server’s CORS and authentication setup supports the request; a client option alone cannot grant access.

Rank #2
Sale
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
  • 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.

Fix 2: Use a controlled same-origin proxy

If you do not control the image host or it cannot provide the required CORS response, route eligible image requests through a server-side proxy under your own origin, then configure html2canvas to use that proxy. The proxy must fetch the image and return it in a form html2canvas can use. The exact endpoint and implementation depend on your application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const canvas = await html2canvas(element, {
  proxy: '/image-proxy',
  onError: (error) => {
    console.warn('html2canvas resource failed:', error.message);
  },
});

/image-proxy is illustrative, not a ready-made or tested endpoint. A usable proxy must be implemented and deployed by your application; setting this option does not create one. Proxy only resources your application is authorized to retrieve.

Protect the proxy

A server-side image proxy can become an unintended way for outsiders to make your server fetch arbitrary URLs. Design its security rules before exposing it. At a minimum, constrain which destinations it can retrieve, validate requested URLs, and apply appropriate access and resource limits. The exact controls depend on your architecture and authorization requirements.

Rank #3
Sale
NexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling
  • 【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.

Understand the options before combining them

Option What it does What it cannot do
useCORS Defaults to false; asks html2canvas to load images using CORS. It cannot make a remote image server permit your origin. The response must grant access.
proxy Defaults to null; identifies a proxy route for loading cross-origin images. It does not create or secure the proxy endpoint for you.
allowTaint Defaults to false. Setting it to true may allow a cross-origin image to be drawn even when that taints the canvas. A tainted canvas cannot be read or exported through APIs such as toDataURL(). It is not a fix for a typical download workflow.
isResourceSameOrigin Customizes how html2canvas classifies a resource. It cannot override browser security policy. Use it only where the resource really is same-origin or your architecture provides equivalent same-origin access.

Usually, choose the path that matches the control you have: configure CORS when you can change the image-serving policy; use a properly constrained same-origin proxy when you cannot. The decision can also depend on credential requirements, deployment complexity, and which image sources your application is authorized to fetch.

Check load timing, URLs, and rendering limits

Once CORS is configured, confirm that the exact image URL is valid and that its response is an image. If the image is authenticated, determine whether the capture request has the credentials it needs and whether the server permits the resulting CORS request. If the image appears after html2canvas starts, adjust your application so capture begins only after the image has loaded.

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

html2canvas reconstructs the page from DOM and supported browser information; it is not a pixel-perfect screenshot mechanism. If the network response is successful and CORS is correct but the result still differs, the cause may be rendering support or page state rather than the CDN’s CORS policy. No particular CDN headers, html2canvas version, browser, or application configuration can be assumed without checking your setup.

Rank #4
Sale
EMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera
  • 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)
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failure symptoms and fixes

Symptom Likely cause to investigate Next step
The console reports a CORS error. The final image response does not permit the page origin, or the request is not being made in the expected CORS mode. Check the final response and origin; configure the image host and enable useCORS: true, or use a controlled same-origin proxy.
The CDN image is absent and there is no clear CORS message. The URL may be wrong, the request may have failed, the response may not be an image, or capture may happen too early. Inspect status, redirects, response type, and console errors in the Network panel; verify the image is loaded before capture.
The image appears after enabling allowTaint, but export fails. The canvas has been tainted by the cross-origin image. Use an allowed CORS response or a same-origin proxy instead of relying on canvas readback.
proxy is configured, but the image still fails. The configured route may not exist, may not return a usable image, or may not be authorized to fetch that source. Verify the proxy implementation, destination rules, returned response, and the exact request html2canvas makes.
A request works without html2canvas but fails during capture. The capture’s request mode, credentials, timing, or resource-handling path may differ from the page’s ordinary image display. Inspect the request made during capture and compare it with the successful page request; check the library’s options for your installed version.

Or skip the browser setup

If you need a screenshot of a website rather than a canvas you control inside your application, ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. A single request returns an image or PDF; it captures a webpage rather than supplying a way around CORS for html2canvas inside your own page.

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

See the ScreenshotNeo API documentation for request options. Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses report the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots.

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

Does a CDN-hosted image always need a proxy?

No. If the image server permits your page’s origin and html2canvas requests the image with CORS, a proxy is unnecessary. A proxy is an alternative when the host cannot provide the needed permission.

Best Value
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
  • 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

Can I fix a blocked image only in JavaScript?

No. JavaScript can select a loading approach, but it cannot set a permission header on a server response it does not control or bypass the browser’s canvas security boundary.

Will html2canvas produce an exact browser screenshot after the image loads?

Not necessarily. It reconstructs the DOM rather than capturing the browser’s rendered pixels, so differences can remain for reasons unrelated to image access.

Quick Recap

SaleBestseller No. 1
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Built-In Mic: The built-in microphone lets others hear you clearly during video calls
$35.90
SaleBestseller No. 2
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Compatible with Nintendo Switch 2’s new GameChat mode
$16.89
Bestseller No. 5
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Fully compatible with Windows 11
$69.99

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.

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