Recommended Free Tools
If a Firebase Storage image appears on your page but disappears from an html2canvas capture or jsPDF file, first check the image response for CORS headers. Displaying an image does not prove the browser will let JavaScript read its pixels. Configure the bucket to allow the exact page origin and GET requests, set crossOrigin = "anonymous" before assigning the image URL, then capture with useCORS: true. Changing jsPDF settings cannot repair a response that the browser has made unreadable.
Why a Firebase image can display but fail in a canvas or PDF
A Firebase download URL can point to a different origin from the page displaying it. Browsers may show a cross-origin image in an <img>, while blocking script access to its pixel data unless the image response permits cross-origin access. Canvas export requires those pixels to be readable. If a canvas draws an image without the required permission, it can become tainted; reading it with toDataURL() then fails. Passing that canvas to jsPDF does not bypass this browser security boundary.
Firebase’s browser download guidance says: “To download data directly in the browser, you must configure your Cloud Storage bucket for cross-origin access (CORS).” Firebase Storage: Download files in web. Cloud Storage returns an Access-Control-Allow-Origin response header when the request origin matches the bucket’s CORS policy. Google Cloud Storage CORS
Diagnose the image request before changing PDF code
- Get the actual download URL. Use Firebase’s
getDownloadURL(ref(storage, path))and inspect the resulting URL locally. Avoid writing full download URLs to production logs if they expose access-bearing tokens. - Inspect the request from the deployed page. Open browser DevTools, select Network, reload the page, and inspect the Firebase image request. Check its status,
Content-Type, and whether the response includesAccess-Control-Allow-Originfor the exact deployed page origin. - Separate access failures from CORS failures. A 401 or 403, a missing object, or a response that is not an image must be resolved as an authentication, Storage Rules, path, or content issue. Confirm the current user is allowed to read the object. CORS does not grant permission to read a protected file.
- Test all relevant origins. Development and production often use different origins, such as localhost and a deployed domain. A policy for one does not automatically allow the other.
html2canvas exposes useCORS, which defaults to false, and allowTaint, which also defaults to false. Its default image timeout is 15,000 ms. html2canvas configuration Its FAQ explains that cross-origin images can taint a canvas and describes proxy loading when direct cross-origin access is unavailable. html2canvas FAQ
#1 Best Overall
- USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
- Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
- Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
- Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
- Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty
Configure Firebase Storage CORS for the page origin
Set the bucket policy to allow the exact origins that render and export the page, including separate development and production origins as needed, and allow GET. Deploy the policy using the Google Cloud tooling and instructions for Cloud Storage CORS. Configure CORS on a bucket
Use the origin only, not an individual page path: an origin consists of the scheme, host, and optional port. For example, https://app.example.com and http://localhost:3000 are distinct origins. Do not use a wildcard merely to make an error disappear when the application needs a narrower allow-list. After changing the policy, repeat the Network check from the actual page origin and confirm the response includes the expected allow-origin header.
Load the image with CORS enabled, then capture and save
Set the image’s crossOrigin property before setting src; setting it afterward can be too late because the browser may already have started the request. Wait for image decoding before placing it in the page and capturing. The following ES module example fetches a Firebase download URL, inserts the image into an invoice, captures the invoice and adds the result to a PDF:
Rank #2
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
import { getStorage, ref, getDownloadURL } from "firebase/storage";
import html2canvas from "html2canvas";
import { jsPDF } from "jspdf";
const storage = getStorage();
const url = await getDownloadURL(ref(storage, "images/photo.jpg"));
const img = new Image();
img.crossOrigin = "anonymous";
img.src = url;
await img.decode();
document.querySelector("#preview").replaceChildren(img);
const element = document.querySelector("#invoice");
const canvas = await html2canvas(element, {
useCORS: true,
allowTaint: false
});
const pdf = new jsPDF();
pdf.addImage(canvas.toDataURL("image/png"), "PNG", 10, 10, 190, 0);
pdf.save("invoice.pdf");
Replace images/photo.jpg and the selectors with your object path and page elements. Ensure the image is part of the element being captured. If img.decode() rejects, handle that as an image-loading failure rather than proceeding to capture. Where you prefer an event-based load flow, wait for the image’s load event and handle its error event before calling html2canvas.
Free tools Windows power users keep installed
One-click scans. No signup required.
What each setting does—and does not do
img.crossOrigin = "anonymous"requests the image in CORS mode without credentials. The server must still return an appropriate CORS header.useCORS: truetells html2canvas to try loading images with cross-origin support. It cannot add headers to Firebase’s response or change the browser’s access decision.allowTaint: falseavoids relying on drawing an image that would make the canvas unreadable. Setting it totrueis not a fix for exporting a tainted canvas.pdf.addImage(...)receives image data from the already-created canvas. If the canvas cannot be read, fix image access before adjusting PDF output.
Choose a fallback if direct bucket CORS is not an option
A controlled same-origin proxy can fetch the image and return it with a valid CORS policy; html2canvas has a proxy option for this use case. The proxy must be designed carefully: validate requested URLs or restrict it to known storage objects, enforce authorization, and avoid creating an open proxy. A server-side PDF renderer is another option when rendering should not depend on a browser client. The trade-offs differ:
| Approach | Storage policy control | Image URL exposure | Authentication | Operational complexity | Where rendering happens |
|---|---|---|---|---|---|
| Direct bucket CORS | Requires control of the bucket CORS policy. | The browser receives the Firebase download URL. | The browser must be able to access the object under the applicable Firebase access rules. | Lowest when you control the bucket and can deploy its CORS policy. | In the browser. |
| Same-origin proxy | The proxy owner controls its response policy; the bucket still needs to be reachable by the proxy. | The browser can request a same-origin proxy URL rather than the bucket URL directly. | The proxy must securely enforce whatever user or service authorization is needed. | Requires operating and securing a proxy. | In the browser after proxy delivery. |
| Server-side PDF rendering | Server code controls how it retrieves the source image; browser CORS is not the rendering path. | The browser need not receive the source image URL if the server returns the finished PDF. | The server must be authorized to fetch the image and the user must be authorized to request the PDF. | Requires a rendering service and its maintenance. | On the server. |
Common errors and practical fixes
The image is visible, but toDataURL() throws a security error
Likely cause: the image was loaded without a CORS-readable response, so drawing it tainted the canvas. Check the image response’s Access-Control-Allow-Origin, bucket policy and request origin. Set crossOrigin before src and use useCORS: true.
Rank #3
- What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
- Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
- Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
- Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
- Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
The console reports a CORS error even though the policy was updated
Check that the policy is on the bucket serving this exact download URL, that it includes the page’s current origin and allows GET, and that the browser’s request is reaching the expected object. Development and production origins must be handled separately when they differ. Verify the response in Network rather than assuming a policy deployment took effect.
The image request returns 401, 403, or 404
This is not fixed by adding CORS alone. Confirm the object path, that it exists, and that Firebase Storage Rules allow the current user to read it. Resolve an authorization or missing-object failure before diagnosing canvas access.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemshtml2canvas returns a capture without the image
Make sure the image has decoded before capture and that the Firebase response is CORS-readable. Check the console and Network panel for a failed request. If loading is slow, consider the documented imageTimeout option; its default is 15,000 ms. A longer timeout can allow slow images more time, but it cannot fix an invalid URL, denied read, or missing CORS header.
Rank #4
- GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
- BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
- EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
- TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
- WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.
It works on localhost but fails after deployment
The deployed hostname is a different origin. Add the exact production origin to the bucket CORS policy, deploy it, then retest from that deployed page. Do not assume that permission for localhost covers a hosted domain.
A browser extension makes it work locally
Do not treat a CORS-disabling extension as a production solution. It changes enforcement only in that local browser; your users’ browsers and deployed application remain subject to the server response.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance, reliability, and cost considerations
Direct browser rendering avoids adding a separate proxy or PDF-rendering service, but it depends on the user’s browser being able to fetch and decode each image and on the page remaining available for capture. Larger images and full-page captures can take longer and use more browser memory. Wait for the specific images the document needs rather than assuming that the page’s initial load means every image is ready. The html2canvas timeout is a wait limit, not a guarantee of successful rendering.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
- 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
- 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
- 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
- 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.
A proxy adds a network hop and an operational component; server-side rendering moves the work off the user’s browser but requires server capacity and secure access to source files. No universal cost or speed winner follows from the browser CORS documentation: it depends on image sizes, request volume, hosting and rendering setup. Avoid retry loops that repeatedly fetch a failing image without distinguishing a transient timeout from a persistent permission or CORS configuration error.
Or skip the browser setup
If your goal is a clean website screenshot rather than a Firebase-backed PDF assembled from your own page, ScreenshotNeo offers a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. For example, using the documented endpoint and parameters:
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 documentation for setup and options. ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers screenshot and PDF tools for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Those capabilities serve website capture; they do not replace configuring Firebase access when your own browser code must read a private image and build a PDF.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFrequently Asked Questions
Does setting crossOrigin = "anonymous" make a Firebase image public?
No. It requests the image without credentials in CORS mode; Firebase Storage Rules still determine whether the object can be read.
Can a Firebase download URL work in an <img> but fail in jsPDF?
Yes. Displaying an image does not establish that its pixels are readable by canvas, which is needed before jsPDF can use the canvas output.
Can html2canvas’s proxy option help if I cannot change the bucket policy?
It can route image loading through a proxy, but that proxy must be controlled and secured; it does not remove the need to authorize access to the image.
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.

