When you draw a photo into an HTML <canvas> and export it with toBlob() or toDataURL(), the result is a newly encoded image of the canvas pixels—not a metadata-preserving copy of the uploaded file. Treat it as an edited derivative. If capture details, copyright information, or location matter, keep the original or use a workflow that explicitly handles metadata.
Why canvas export can lose photo metadata
drawImage() paints image content into the canvas bitmap. The export methods then encode that bitmap as a new image. The HTML Standard’s canvas serialization rules describe the output in terms of the canvas pixels and generated output properties; they do not define copying the source file’s complete EXIF, IPTC, or XMP blocks into the result. The safe expectation is therefore that source metadata will not carry through—not a claim that every browser and encoder behaves identically for every ancillary field.
As an Amazon Associate I earn from qualifying purchases.
This distinction matters because metadata can contain more than camera settings. It may include capture time, camera or lens details, copyright fields, and GPS location. The output can still be a perfectly viewable image even when those details are absent.
Free tools Windows power users keep installed
One-click scans. No signup required.
What the export methods do—and do not—control
| Method | What it returns | Useful controls and caveats |
|---|---|---|
canvas.toBlob(callback, type, quality) |
Asynchronously provides a Blob encoding the canvas bitmap. |
PNG is the default and required format; JPEG and WebP are commonly supported. The quality value applies to supported lossy formats. Check the resulting blob’s type rather than assuming the requested format was available. |
canvas.toDataURL(type, quality) |
Returns a data URL encoding the canvas bitmap. | Unsupported requested types fall back to PNG. The returned data URL is not the original file and does not offer a standard option to preserve all its metadata. |
These behaviors are documented in MDN’s toBlob() reference and MDN’s toDataURL() reference. A requested JPEG or a high quality setting affects the encoding choice or image appearance; neither restores source EXIF tags.
#1 Best Overall
- Fast for better pictures and Full HD video. Full HD (1920x1080) video support may vary based upon host device, file attributes, and other factors
- Great choice for compact to mid-range point-and-shoot cameras
- From 32GB to 256GB(1) to store tons of pictures and even more Full HD video(2). (1)1GB=1,000,000,000 bytes Actual user storage less
- Exceptional video recording performance with UHS Speed Class 1 (U1)(5) and Class 10 rating for Full HD video (1080p)(2). (5)UHS Speed Class 1 (U1) designates a performance option to support real time video recording with UHS enabled host devices
- Quick transfer speeds up to 100MB/s. Up to 100MB/s[64GB-256GB; 90MB/s for 32GB] read speed; write speed lower Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors 1MB=1,000,000 bytes
The standard specifies 96 dpi for output formats that support resolution metadata. That is an output property written during serialization, not evidence that original capture date, camera details, or other provenance survived.
Choose a workflow based on whether pixels or metadata must change
| Workflow | Best suited to | Metadata implications |
|---|---|---|
| Canvas re-encoding | Compositing, cropping, annotations, filters, resizing, or other rendered pixel changes. | Provides format and quality controls, but no standard full source-metadata preservation control. |
| Metadata-aware processing of the original | Keeping compressed image data intact when possible while selectively retaining, updating, or removing fields. | Requires a reader/writer that handles the chosen format and fields correctly; validate the resulting file. |
For an upload or editing app, retain a reference to the original File or Blob and treat the canvas export as a separate derivative. If metadata must accompany edits, decide which fields should remain and which should be removed, then use a format-aware metadata step and inspect the final output. Do not blindly copy every field: cropping or resizing can make dimensions or orientation stale, and timestamps or location may need deliberate treatment.
Rank #2
- Great choice for compact to mid-range point-and-shoot cameras
- Quick transfer speeds up to 150MB/s (Up to 150MB/s read speed engineered with proprietary technology to reach speeds beyond UHS-I 104MB/s, requires compatible devices capable of reaching such speeds. Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
- Up to 256GB to store tons of pictures (1GB=1,000,000,000 bytes. Actual user storage less.)
- Exceptional video recording performance with UHS Speed Class 1 (U1) Class 10 rating for Full HD video (1080p) (UHS Speed Class 1 (U1) designates a performance option designed to support real time video recording with UHS enabled host devices. See consumers speed page on SanDisk site. Full HD (1920x1080) video support may vary based upon host device, file attributes, and other factors. Visit the SanDisk Video Knowledge Base for more information.)
- Compatible with SanDisk SD UHS-I card reader (sold separately)
For browser-based editing, download or archive the original separately before cropping, resizing, filtering, annotating, or converting. This preserves a path back to the uploaded file even if the edited download no longer contains its original details.
Pick toBlob() for large exports; it does not solve metadata loss
For larger images, MDN recommends toBlob() with URL.createObjectURL() rather than toDataURL(). A data URL encodes the image into an in-memory string, which can create performance and URL-length problems. This is an efficiency choice only: both methods export a canvas rendering, not a standard metadata-preserving copy.
Rank #3
- Brand: Sandisk
Watch for the separate cross-origin export failure
Metadata loss is not the only issue a canvas workflow can encounter. If a page draws an image from another origin without the required CORS approval, the canvas becomes tainted. Calls such as getImageData(), toBlob(), and toDataURL() can then fail with a SecurityError, as described in the HTML Standard’s canvas security rules.
Setting an image’s crossOrigin property is not sufficient on its own: the remote server must also grant the required access. This is a separate constraint from metadata handling; an origin-clean canvas can export successfully and still omit the source file’s metadata.
Rank #4
- Save time with card offload speeds of up to 200MB/s powered by SanDisk QuickFlow Technology (Up to 200MB/s read speeds, engineered with proprietary technology to reach speeds beyond UHS-I 104MB/s, require compatible devices capable of reaching such speeds. Based on internal testing; performance may be lower depending upon host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes. X = 150KB/sec. SanDisk QuickFlow Technology is only available for 64GB, 128GB, 256GB, 512GB and 1TB capacities. 1GB=1,000,000,000 bytes. 1TB=1,000,000,000,000 bytes. Actual user storage less.)
- Pair with the SanDisk Professional PRO-READER SD and microSD to achieve maximum speeds (sold separately)
- Shot speeds up to 90MB/s (Write speed up to 90MB/s. Based on internal testing; performance may be lower depending upon host device. 1MB=1,000,000 bytes. X = 150KB/sec.)
- Perfect for shooting 4K UHD video and sequential burst mode photography (Full HD (1920x1080) and 4K UHD (3840 x 2160) video support may vary based upon host device, file attributes and other factors. See HD page on SanDisk site.)
- UHS Speed Class 3 (U3) and Video Speed Class 30 (V30) (UHS Speed Class 3 designates a performance option designed to support 4K UHD video recording with enabled UHS host devices. UHS Video Speed Class 30 (V30), sustained video capture rate of 30MB/s, designates a performance option designed to support real-time video recording with UHS enabled host devices. See the SD Association’s official website.)
Metadata removal can help privacy—or hurt provenance
Removing location data before public sharing may be desirable. Losing capture dates, copyright fields, or camera information may be a problem for an archive, newsroom, photographer, or anyone trying to establish where an image came from. Decide what the exported copy should retain rather than treating metadata removal as automatically good or bad. The canvas export API does not provide a standard control for selectively preserving the original metadata.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A 2013 WHATWG mailing-list discussion raised this issue in the context of photo-editing applications and the difficulty of adding metadata after image encoding. It is historical context, not a current browser test or a guarantee about every present-day encoder.
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.




