Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If html2canvas leaves out an image, the most common cause is that the image is hosted on another origin and the browser will not let the page read it into a canvas. Set useCORS: true only if the image server sends an appropriate CORS response header; otherwise, serve the image through a controlled same-origin proxy. Setting allowTaint: true is not a safe export fix: it can make the resulting canvas unreadable.
Why html2canvas skips images
html2canvas reconstructs a visual representation from the DOM; it does not take a native screenshot of the pixels on screen. Its documentation says the result is based on information available on the page and may not exactly match the browser’s rendered appearance. html2canvas documentation
The usual reason a particular image is missing is cross-origin security. When a page draws an image from another origin onto a canvas, browser security can taint that canvas. A tainted canvas cannot be safely read back or exported. By default, html2canvas checks for this risk and skips the image when allowTaint is false. The project’s FAQ describes the issue directly: “Drawing images that reside outside of the origin of the current page taints the canvas, making it unreadable.” html2canvas FAQ
“Origin” is based on the page’s scheme, host, and port. An image that appears related to your site can still be cross-origin if it comes from a CDN hostname, a different subdomain, or a redirected URL on another host. Check the final request URL, not just the URL written in the HTML.
#1 Best Overall
- Features an 8 Megapixel camera for capturing Ultra High Definition live images up to 3264 x 2448 pixels
- High frame rate for lag-free live streaming – streams at up to 30 fps at full HD, and up to 15 fps at 3264 x 2448 pixel
- Fast focusing speed helps minimize interruptions for frequent switching between different materials; features Sony CMOS Image Sensor for exceptional noise reduction and color Reproduction – great for capturing in dimly lit environments
- Designed and made in Taiwan. Multi-jointed stand offers a simple fix for tightening loose joints caused by heavy daily use.Max Shooting Area:13.46 inch x 10.04 inch
- Works with a variety of software and applications on Mac, PC and Chromebook that allows you to use it in different ways. System Requirements - Mac Intel Core i5 CPU 2.5 GHz or higher, OS X 10.10 or higher, Solid-state drive, and 200MB of free hard disk space, 256MB of dedicated video memory (For lag-free live streaming up to 1920 x 1080, and video recording of 1920 x 1080). Windows Recommended Requirements - Microsoft Windows 10,Intel Core i5 CPU 3.40 GHz or higher, 4 GB RAM, 200MB of free hard disk space, 256MB of dedicated video memory (For lag-free live streaming up to 1920 x 1080, and video recording of 1920 x 1080)
Choose the fix that matches the image server
Image stays on the page’s origin
Use a same-origin image URL and check that redirects do not send the request to a different host. The project’s limitations documentation says images need to be same-origin unless a proxy is used. html2canvas limitations
Remote image server supports CORS
Enable html2canvas’s CORS image loading and confirm that the server’s response permits the origin of your page. For a public image that is intended to be shared broadly, the response might include Access-Control-Allow-Origin: *. For restricted resources, the server should permit the requesting origin under its own access policy. The correct header depends on the server’s configuration and whether credentials are involved; do not assume that setting a client option changes the server’s policy.
Remote server does not support CORS
Fetch the image through a server-side proxy you control, hosted on the page’s origin, and configure html2canvas to use that proxy. The proxy must validate destinations and return the image safely; accepting arbitrary URLs from users can expose internal network services or turn the endpoint into an abuse vector. The html2canvas getting-started guide demonstrates a proxy-based approach. html2canvas getting started
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →You need an exportable canvas
Keep allowTaint false (its documented default) and solve the origin problem with same-origin delivery, CORS, or a proxy. Setting allowTaint: true allows tainted images to be drawn, but it does not restore permission to read or export the canvas. The configuration reference documents the option. html2canvas configuration
Rank #2
- USB Document Camera with adjustable image reversal: The camera that can manually adjust image reversal. In video chat or image output, the image can be freely adjusted left/right and up/down; you can also manually adjust the reversed image that appears in the device to a normal image
- 8MP/2448P document camera with 30fps: it output ultra-high-definition images and videos live transmission, up to 2448P megapixels. Press the focus button once to automatically focus the document camera once. Moving the object under the lens, the camera will not be arbitrary automatic focus and the image dance. Macro can capture objects as close as 3.94"
- Document Camera with Adjustable Image Brightness : the usb camera has brightness (plus) and brightness (minus) buttons, you can manually adjust the image brightness with 10 degree, to make sure that you can get the clear image. Camera comes with 14 ring lamp beads, 3 levels of brightness adjustable, which can eliminate shooting problems under difficult lighting conditions, allowing you to capture objects in dark and bright environments, and can also achieve Selfie fill-in function
- Foldable Document Camera for teachers/classroom: embedded design, occupies a small space after folding, easy to carry; Multi-joint support with multi-angle rotate freely usb camera can capture 2D and 3D objects better and shooting high-definition images and videos. Maximum covering area: 16.5" x 116" in. (A3 paper)
- USB Camera with highly compatible, plug-and-play : applicable to Windows PCS, Macs, and Chromebooks, automatically installs drivers when the device is plugged in, compatible with Tiktok, Google Meet, Skyp-Microsoft Teams, Zoom; it has built-in dual silicon microphones, which can reduce noise and improve sound quality
Runnable browser example with CORS
Use this when the remote image server supports CORS for your page. Replace the selector with the element you want to capture and ensure the image response has the right header.
import html2canvas from 'html2canvas';
const target = document.querySelector('#capture');
if (!target) {
throw new Error('Could not find #capture');
}
const canvas = await html2canvas(target, {
useCORS: true,
allowTaint: false,
imageTimeout: 15000,
logging: true
});
document.body.appendChild(canvas);
// Example export after capture:
const pngDataUrl = canvas.toDataURL('image/png');
console.log(pngDataUrl);
This is browser-side JavaScript: html2canvas depends on browser APIs such as window and document, and the project’s getting-started guide says it is not suitable for Node.js. html2canvas getting started
Use a same-origin proxy when CORS is unavailable
A proxy is appropriate only when you control the server and are permitted to retrieve and serve the image. The basic flow is:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →- Your page asks your backend for an image URL.
- The backend validates the requested destination, retrieves the image, and returns it in a format usable by the page.
- The browser loads that same-origin endpoint, and html2canvas receives the proxy option.
The proxy URL and implementation are application-specific; do not copy an open proxy or accept arbitrary user-supplied destinations without strict validation. The html2canvas guide shows an example proxy that returns a data URI for a requested resource. html2canvas getting started
Rank #3
- 🔍 3-in-1 Versatile Tool: The document camera transforms into a dynamic webcam and visualizer, ideal for classroom lessons or remote teaching. Adjust its 360° lens to capture crisp 1080P live demos, worksheets, or 3D objects—perfect for teachers and students sharing resources interactively
- 🎒 Portable USB Design: Foldable hose and compact build make this USB document camera a travel-ready companion. Effortlessly rotate it for multi-angle views during video calls or homeschool sessions—no bulky setups required
- 🎥 Crystal-Clear Focus & Detail: Designed as a document camera for teachers, its manual focus ensures sharp, blur-free images even in dim lighting. Show fine text, science experiments, or art projects in stunning 1080P resolution at 30fps
- 🎤 Noise-Reduced Collaboration: Dual built-in mics eliminate background noise, delivering studio-quality sound for Zoom, Google Meet, or TikTok lessons. Perfect for classroom discussions, parent-teacher conferences, or lively student Q&A sessions
- 💻 Plug-and-Play Compatibility: Works seamlessly with Windows, Mac, Chromebook, and apps like Microsoft Teams or Skype. Includes USB-C for instant setup—ideal for document camera for classroom tech or home office video chats!
import html2canvas from 'html2canvas';
const target = document.querySelector('#capture');
if (!target) throw new Error('Could not find #capture');
const canvas = await html2canvas(target, {
proxy: '/image-proxy',
useCORS: false,
allowTaint: false,
imageTimeout: 15000
});
const blob = await new Promise((resolve, reject) => {
canvas.toBlob(result => {
if (result) resolve(result);
else reject(new Error('Canvas export failed'));
}, 'image/png');
});
const downloadUrl = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = downloadUrl;
link.download = 'capture.png';
link.click();
URL.revokeObjectURL(downloadUrl);
The example assumes that /image-proxy is a safe endpoint implemented by your application; html2canvas does not supply a universal proxy service. Proxying adds a network hop and server work, so account for latency, caching, access controls, privacy rules, and the rights to retrieve the remote image.
Wait for images and prevent oversized captures
Wait for the target’s images
Capture after the relevant images have loaded. html2canvas’s imageTimeout option has a documented default of 15,000 milliseconds; setting it to 0 disables the timeout rather than making loading succeed. html2canvas configuration
async function waitForImages(root) {
const images = [...root.querySelectorAll('img')];
await Promise.all(images.map(async image => {
if (image.complete) return;
await new Promise(resolve => {
image.addEventListener('load', resolve, { once: true });
image.addEventListener('error', resolve, { once: true });
});
}));
}
This waits for ordinary <img> elements to finish loading or fail. It does not fix a CORS denial, and it does not guarantee that CSS backgrounds, fonts, or other asynchronous page content are ready.
Set dimensions for large elements
If an output is blank or truncated, browser canvas-size limits may be involved. The html2canvas FAQ recommends setting windowWidth and windowHeight to the element’s scroll dimensions when rendering large elements. html2canvas FAQ
Rank #4
- [Crystal-Clear Imaging and Smooth Video Streaming] 8 Megapixel Ultra-High definition SONY camera captures live images at up to 3264 x 2448 pixels with lag-free video streaming at 30 fps across all resolutions.
- [Your Space-Saving Multi-Joint Camera] Experience the durability of our multi-joint design while enjoying a generous viewing size of 14.72 x 11 inches. This compact camera is perfect for your desktop set up.
- [Powerful Features, Crisp Image] Featuring LED light, and an anti-glare sheet for exposure challenges in varying lighting. 7-segment brightness control, image flip, and built-in mic ensure top-notch performance. Autofocus lens and macro capability (capturing objects as close as 3.9 inches).
- [Feature-Packed INSWAN Documate Software] The bundled full-function INSWAN Documate software offers digital zoom, image annotation, hue adjustment, image rotation/flip, video recording, snapshots and other useful features. Download the latest version for free and access tutorial videos!
- [Plug-n-Play & High Compatibility for Effortless Conferencing] The INS-1 comes with a USB-A cable for instant plug-and-play operation. Seamlessly works with Documate and other webinar software on PC (Windows 7/8/10/11), Mac (OS13.5 or higher), iPad (OS 17 or higher; must have a USB-C port) , Chromebook (38.0 or higher). Designed and made in Taiwan.
const target = document.querySelector('#capture');
if (!target) throw new Error('Could not find #capture');
const canvas = await html2canvas(target, {
windowWidth: target.scrollWidth,
windowHeight: target.scrollHeight,
useCORS: true
});
Increasing dimensions can also increase memory use and rendering time. If a very long page exceeds browser limits, capture smaller sections rather than assuming a larger canvas will always work.
Diagnose a missing image step by step
- Inspect the final request. In the browser’s Network panel, find the image and note its final URL after redirects, response status, and response headers.
- Check the origin. If the final host, scheme, or port differs from the page’s, treat it as cross-origin.
- Check the CORS response. For a cross-origin image, verify that the image response includes an
Access-Control-Allow-Originvalue that permits your page. - Confirm the capture options. Set
useCORS: truebefore calling html2canvas; retainallowTaint: falsewhen you need a readable/exportable canvas. - Check loading and size. Wait for images, review timeout behavior, and set the capture dimensions if the output is blank or truncated.
- Exclude a node only when exclusion is acceptable. Use
data-html2canvas-ignoreor theignoreElementspredicate to omit a problematic element deliberately. html2canvas configuration
Other limits that are not image CORS bugs
- Cross-origin iframes: Browser security prevents access to a cross-origin frame’s
contentDocument, so html2canvas cannot render its contents. Same-origin iframes are supported recursively. html2canvas limitations - Browser-rendered content: html2canvas reconstructs the page from DOM and CSS information; unsupported CSS or content rendered outside that information may differ from the visible page. html2canvas documentation
- Plugins: Flash and Java applet content is not rendered. html2canvas documentation
- Node.js execution: The library relies on browser globals such as
windowanddocument; it is not a server-side Node.js screenshot engine. html2canvas getting started
Or skip the browser setup
If your goal is a rendered website screenshot rather than a canvas generated inside your own page, ScreenshotNeo is a website screenshot API and MCP server. It captures a URL into PNG, JPEG, WebP, or PDF, with options for full-page and element captures. Its clean-shot steps accept cookie banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses include X-Page-Verdict and X-Billed headers. An MCP server exposes screenshot tools to Claude, Cursor, and other MCP clients.
For example, save a WebP screenshot of a page with one GET request:
Free tools Windows power users keep installed
One-click scans. No signup required.
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 authentication and capture parameters. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. This is an alternative for capturing a URL, not a way to make a tainted html2canvas canvas readable.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Best Value
- Document camera with Image reversal function: The image reversal function can be realized through the button (no need to pass the software). When video chatting or picture output, the picture can be freely reversed left and right, up and down; The PAKOTOO document camera connects the computer via USB 2.0 cable, it does not support zoom and HDMI features, nor it does compatible with iPad.
- Document camera for teachers with 3 levels of brightness adjustment and 10 levels of exposure adjustment: The brightness function can be realized by buttons to ensure that you can get clearer images. It can also realize the Selfie fill light function in dark and bright environments
- Document camera for classroom with Foldable: Embedded design, takes up little space after folding, and is easy to carry; multi-joint supports multi-angle free rotation, which can better capture 2D and 3D objects. Maximum coverage area: 16.5" x 11.6" in (A3 paper)
- USB document camera with autofocus: 2448P high-definition document cameras, press the focus (AF) button once, and the document camera will automatically focus once. Move the object under the lens, the image will not be blurred. Macro captures objects as small as 3.94"
- Important: PAKOTOO Document camera is not plug and play. You need to select "USB Camera" in the system that comes with your computer. The document camera is equipped with a USB-C cable, which can be directly used with devices with USB-C interface such as MacBook. Compatible with Windows PCS, Macs and Chromebooks, works with Tiktok, Google Meet, Skyp-Microsoft Teams, Zoom; If you encounter any problems during the use of the product, or the computer does not recognize the camera, please be sure to contact our friendly support team for a quick solution.
Frequently asked questions
Does setting useCORS: true change the image server’s headers?
No. It asks html2canvas to attempt CORS image loading; permission still has to come from the image server’s response.
Can html2canvas capture images inside a cross-origin iframe?
No. The browser blocks access to the frame’s document. A same-origin iframe is a different case and is supported recursively.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsCan I use html2canvas in a Node.js script?
Not as a standalone Node.js screenshot tool: it relies on browser APIs including window and document.
Quick Recap
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.

