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

When html2canvas omits a CDN-hosted image, the usual cause is that the image is cross-origin and its final response does not permit your page to use it in a canvas. Set useCORS: true only when the image server returns an appropriate Access-Control-Allow-Origin header. If you cannot configure that server, use a controlled same-origin proxy. allowTaint: true is not a fix when you need to export the canvas: a tainted canvas cannot be read with toDataURL().

Why html2canvas leaves out CDN images

html2canvas does not take a literal screenshot of the browser’s rendered pixels. It reconstructs a representation of the page from the DOM and browser-accessible resources. That means an image can be visible in the page yet unavailable for a canvas export.

A CDN image is cross-origin when its origin—scheme, host, and port—differs from the page’s origin. Browsers enforce cross-origin canvas restrictions. An image loaded without suitable CORS permission can taint a canvas, preventing scripts from reading its pixels. html2canvas’s default allowTaint: false avoids that outcome by skipping images that would taint the canvas. The html2canvas FAQ puts the boundary plainly: “html2canvas cannot circumvent content policy restrictions set by your browser.” html2canvas FAQ; MDN: Use cross-origin images in a canvas.

There are two separate requirements for a CORS image: the browser must request it in CORS mode, and the image server must return a response permitting the requesting page origin. A JavaScript option can request CORS; it cannot make a server grant permission.

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 image request before changing options

  1. Find the final request. Open browser developer tools, select the Network panel, and reload or recapture the page. Find the image request and inspect its final URL after any redirects, status, response type, and headers. Compare the image’s origin with the page’s origin.
  2. Check the console. Look for a CORS message, an image load failure, or another network error. A missing image is not automatically a CORS issue; an incorrect URL, failed request, or capture occurring before the image loads can produce a similar result.
  3. Surface resource failures. Use html2canvas’s onError callback while diagnosing. Its configuration reference documents the callback and image-related options.
  4. Check authentication and timing. Determine whether the URL needs cookies or authorization, whether redirects change the response, and whether the image has finished loading before calling html2canvas. The correct remedy depends on the actual final response.

These checks distinguish a denied cross-origin request from a bad URL or other loading problem. No single client-side option diagnoses or fixes all of those cases.

Fix 1: Enable CORS when you control the image host

If you control the CDN or origin serving the image, configure it to return an Access-Control-Allow-Origin value that permits the page’s origin. Then ask html2canvas to load images using CORS mode with useCORS: true. The browser checks the response; if it does not permit your page, the image remains unavailable for a readable canvas. See the html2canvas FAQ and configuration options.

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

Use a permissive origin value only when it fits your hosting and security policy. If access is restricted to a set of sites, allow the page origin rather than treating a client-side setting as a substitute for server configuration.

Fix 2: Use a controlled same-origin proxy

If you do not control the remote host, or it cannot return the required CORS header, a server-side proxy under your own origin is the documented alternative. Configure the proxy to retrieve authorized image resources and set html2canvas’s proxy option to its route. The application-specific example below is illustrative; it is not a ready-made endpoint.

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

The proxy must be implemented and deployed by your application. Do not create an unrestricted endpoint that fetches arbitrary URLs: validate and constrain destinations, and proxy only images your application is authorized to retrieve. The html2canvas getting-started guide describes the proxy approach.

Choosing between CORS and a proxy

Question Configure CORS on the image host Use a same-origin proxy
Do you control the image host? Best fit when you can configure its response headers. Useful when the host cannot grant the needed access.
Who must change infrastructure? The image host or CDN configuration. Your application must implement and operate the proxy.
What about credentials? Confirm the actual authentication and CORS requirements for the image request; a permissive header alone may not resolve credential-related constraints. The proxy must retrieve the resource using an authorized method and handle access controls safely.
Security consideration Allow only origins and access appropriate for your hosting policy. Restrict destinations and authorization to prevent arbitrary server-side fetches.

What the html2canvas options do—and do not do

  • useCORS: Defaults to false. It attempts to load images using CORS, but the image response still needs to permit the requesting page origin.
  • proxy: Defaults to null. It specifies a route for loading cross-origin images through a proxy. The route and its security rules are your responsibility.
  • allowTaint: Defaults to false. Setting it to true may allow a cross-origin image to be drawn while tainting the canvas. It does not make that canvas readable or exportable with APIs such as toDataURL(); do not use it as the fix for a screenshot or download workflow.
  • isResourceSameOrigin: This can customize how html2canvas classifies resources. Use it only when the resource genuinely is served under the same origin or your architecture provides equivalent same-origin access. It cannot override browser security policy.

Check the installed html2canvas version’s configuration documentation before relying on an option’s availability or exact behavior. Even with CORS resolved, html2canvas reconstructs the page rather than capturing browser pixels, and it does not support every browser-rendered effect identically.

Common failures and fixes

The image is still missing with useCORS: true

Inspect the final response, not just the request URL. Confirm that it returns the intended image and that its CORS response permits your page origin. Redirects can lead to a different final host or response. If the host does not grant access, configure it or use a controlled proxy.

The canvas appears, but export fails

If you enabled allowTaint: true, the canvas may contain the image but be tainted. Reading or exporting its pixels is then blocked by browser security. Use a successful CORS-enabled load or a same-origin proxy instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

The console shows a network or image error, not a CORS error

Verify the image URL, response status and content type. Check whether access requires authentication, whether the request redirects, and whether the resource is available to the browser. Fix the underlying load or access problem before changing canvas options.

The image loads on the page but disappears in the capture

Visible page rendering does not prove the canvas can read the image. Check the response’s CORS permission, then ensure the image has loaded before capture. If both conditions are satisfied and the image is still absent, investigate html2canvas’s supported rendering behavior and the installed version rather than assuming the CDN is at fault.

A proxy request creates a security or access problem

Do not accept arbitrary user-supplied destinations without validation. Restrict hosts and paths as appropriate, enforce your application’s authorization rules, and return only resources the caller is permitted to access. The proxy is an application security boundary, not merely a workaround for a browser error.

Or skip the browser setup

If your goal is a screenshot of a website rather than an html2canvas export inside your application, ScreenshotNeo is a website screenshot API and MCP server. It accepts one GET request with a URL and returns a PNG, JPEG, WebP, or PDF. Its clean-shot workflow accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

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

For example, this cURL request captures a URL as WebP. Replace the example URL with the page you want to capture and use your API key:

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)
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. It also provides Python and Node.js examples, along with options for full-page and element captures, PDF output, viewport and device settings, waits, custom headers, cookies, and more.

ScreenshotNeo includes 1,000 screenshots per month free without a card; paid plans start at $5 for 3,000 screenshots. Sign up for the free plan.

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

Performance, reliability, and cost considerations

For an in-app html2canvas workflow, CORS configuration avoids adding a proxy service to the request path when you control the image host. A proxy adds server-side fetching and requires you to secure, deploy, and operate that endpoint. The documentation cited here does not establish timings, CDN-specific behavior, or the cost of either approach; evaluate those against your application’s actual traffic and infrastructure.

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

For remote website captures, ScreenshotNeo’s stated plans are monthly: Free includes 1,000 shots, Starter is $5 for 3,000, Growth is $15 for 15,000, Pro is $39 for 60,000, Scale is $99 for 250,000, and Business is $249 for 1,000,000. Yearly billing gives two months free. Every feature is on every plan. These plan details are distinct from html2canvas: the API captures a website remotely, while html2canvas runs in your page to reconstruct a DOM-based canvas.

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

Frequently Asked Questions

Does html2canvas support CDN images?

It can include cross-origin images when the browser is allowed to use them in the canvas—for example, when the image response permits your page origin and the request uses CORS. Otherwise use an authorized same-origin proxy.

Can I fix a CORS error by setting a request header in JavaScript?

No client-side setting can grant permission that the image server does not return. Configure the host’s CORS response or proxy an authorized image through your own origin.

Will allowTaint: true let me download the result?

No. A tainted canvas cannot be read back through APIs such as toDataURL().

Free tools Windows power users keep installed

One-click scans. No signup required.

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

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.