iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
In Node.js, image metadata is not an all-or-nothing choice. With Sharp, output strips metadata by default; its keepMetadata() option retains broad categories—including EXIF, ICC, XMP, and IPTC—so it can preserve attribution but also carry location and other sensitive information. Inspect the input, decide which information the destination needs, and verify the output rather than treating broad retention as a privacy filter.
What Sharp keeps or removes by default
Sharp’s output documentation says metadata is removed by default, including EXIF-based orientation, and the image is converted to device-independent sRGB. That default can reduce the amount of embedded information, but stripping metadata also removes attribution and other useful information if those details are stored in the image.
Sharp offers two broad retention methods. keepMetadata() retains EXIF, ICC, XMP, and IPTC. withMetadata() retains most EXIF, XMP, and IPTC, adds a web-friendly sRGB ICC profile where appropriate, and permits orientation and density updates. These choices affect more than photographer credit: they also affect technical and potentially sensitive metadata. See Sharp’s output options documentation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Why attribution and privacy can conflict
Attribution is made up of distinct roles
IPTC metadata includes fields such as Creator, Credit Line, and Copyright Notice, but these are not interchangeable. A photographer or creator, an editor, a copyright holder, and a credit line can refer to different people or information. IPTC’s guidance also notes that field mappings and meanings vary by Exif version. Exif 3.0 changes the semantics of Artist and Copyright and adds Photographer and Image Editor tags. When writing or mapping metadata, preserve the intended role instead of copying one name into every field. See the IPTC Photo Metadata User Guide and Exif 3.0 specification.
#1 Best Overall
- 【Combination set】: More affordable, The data blocker combination kit shown in the main image, which can meet your daily use needs, suitable for any mobile phones and electronic devices with USB A and USB C interfaces.
- 【PROTECT YOUR PHONE / TABLET】 : Think about that Traveling or going out in public areas one time when you needed a charge at an airport but were too scared to get juice jacked. That is why we brought this data blocker for you. Charge your device with this powerful USB data blocker without worrying about any hacker getting in your device.
- 【HIGH SPEED CHARGING】: USB defenders are made for blocking the hacker as well as fast charging, The 4th generation design chip can be used for the universal charging standards automatically switch to, Compatible with Various brands of smartphones, ensure compatibility with your device. and charge at up to 2.4 Amps.
- 【to make high quality safety products】:Advance manufacturing process design The metal shell material has multiple safety protection functions such as heat dissipation and fire safety, USB Data Blocker are used by the governments of the USA, Canada, UK and New Zealand as well as 100s of corporations around the world to secure their devices,100% guarantee against hacker attack.
- 【Perfect Compatibility】: We USB-C to USB-C and USB-A to USB-C data blocker ensures seamless data security across all your Type-C tech gadgets including iPhone 15 and 16 series, Galaxy S25 S24 S23 S22 S21 S10, USB-C iPad, Android Tablets, MacBooks, and more
Location and contact details can travel with the image
Photos may contain location coordinates when the camera had access to Location Services. Apple warns that people who receive shared photos containing location metadata may be able to access it and learn where the image was taken. Creator contact details and other embedded fields may also be unnecessary for a particular destination. Apple explains how location metadata is managed in Manage location metadata in Photos.
Metadata may appear in more than one representation
IPTC Core values can be embedded in IIM, XMP, or both; IPTC says software should synchronize parallel values. IPTC Extension fields are XMP-only. This matters when selecting or editing fields: a value can persist in one representation even if another is changed. The IPTC user guide describes these formats and synchronization expectations.
Rank #2
- The Ultimate Data Guardian: Worried about the risk of mobile phone data leakage or viruses when using public charging stations? A data blocker is an effective way to reduce these risks. By physically blocking data transfer, it helps protect your device from potential spyware or hacking attempts while charging
- Only for Charging: With our USB data blocker, you can charge your device without any risk of data transfer. It allows only the charging function while blocking data transfer and syncing. Your phone will not receive pop ups requesting data transmission
- Fast Charging for USB C Data Blocker: JSAUX USB C Data Blocker adopts PD 3.0/2.0 fast charging technology, supports 100W fast charging (20V/5A), and is also compatible with charging power of 240W/140W/60W/45W/36W/27W/15W, etc. The USB Data Blocker supports up to 2.4A charging. (NOTE: The actual charging speed depends on your device and wall charger.)
- Compact Design for Travel and Daily Use: Small and lightweight for easy carrying in pockets, backpacks, or keychains. Ideal for travelers, commuters, and anyone who frequently uses public charging stations. The transparent casing provides a modern and durable look
- USB & USB C Data Blockers 4 Pack: We offer you two USB Data Blockers and two USB C Data Blockers, compatible with iPhone 18 Pro/18 Pro Max, iPhone Duo, iPhone 17/17e/Air/17 Pro/17 Pro Max, iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max, Samsung, iPad, Macbook and other devices. Works with both USB and USB C ports, ideal for safe charging at airports, hotels, and public charging stations
A practical Sharp workflow in Node.js
1. Inspect the source image
Sharp’s metadata() reads header metadata without decoding compressed pixel data. Where present, it can expose orientation and raw EXIF, IPTC, XMP, and ICC data. Use this inspection to understand what is in the input before deciding how to write the output.
const sharp = require('sharp');
const input = 'input.jpg';
const metadata = await sharp(input).metadata();
console.log({
format: metadata.format,
orientation: metadata.orientation,
hasExif: Boolean(metadata.exif),
hasIptc: Boolean(metadata.iptc),
hasXmp: Boolean(metadata.xmp),
hasIcc: Boolean(metadata.icc)
});
2. Choose a policy for the destination
Write down which fields the image needs to carry. A policy might retain Creator or Photographer, Credit Line, Copyright Notice, and applicable rights statements, while excluding GPS coordinates and creator contact details when they are not needed. This is a practical allowlist recommendation, not a universal IPTC requirement; the appropriate fields depend on editorial needs, privacy context, and destination.
Rank #3
- ✨ Absolutely Safe: Features an internal physical data line cut design, permanently disconnecting the data pins in the USB interface, leaving only the power pathway, effectively eliminating the risk of data leakage.
- ⚡ Fast Charging Without Slowdown:The usb data blocker Adapter supports charging up to 100W and is compatible with multiple fast charging protocols. Charging speed is the same as the original charger, ensuring both safety and efficiency.
- 🔗 Wide Compatibility: Suitable for all devices that use various charging interfaces. Whether it’s iPhone, Android phones, iPad, tablets, Bluetooth headsets, or power banks, just plug and play.
- 👌 Compact and Portable: The lightest model weighs only 2.2g, as compact as a USB drive. Protects safe charging anytime, anywhere.
- 🎯 Plug and Play: No drivers, no apps, no complicated setup required. Simply insert into a public USB port and connect your charging cable to start safe charging.
3. Select a Sharp output approach
If removing embedded metadata is the priority, Sharp’s default output behavior strips it. If broad retention is appropriate, use keepMetadata() or withMetadata() with a clear understanding of what each retains. Neither method should be mistaken for a selective privacy filter. Sharp documents withExif() and related controls, but its cited documentation does not establish a universal API for selectively preserving every IPTC and XMP field. Where a precise field-level policy is required, use a metadata workflow that supports it and verify its behavior.
// Broad retention: preserves supported metadata categories.
await sharp(input)
.keepMetadata()
.toFile('output.jpg');
// Alternative broad retention behavior, including web-friendly color handling.
await sharp(input)
.withMetadata()
.toFile('output-with-metadata.jpg');
4. Verify the result
Read the output metadata after transformation and confirm that required attribution remains while fields excluded by policy are absent. Checking the output is important because broad retention is not equivalent to a tested field-by-field allowlist.
Rank #4
- Special Attention: For optimal charging speeds, ensure the entire connection is USB-C to USB-C from end to end. Using this Data Blocker with a USB-A to USB-C cable may result in slow charging or no charging due to the absence of data pins.
- No Loopholes Data Security: Hackers are everywhere—don't let your USB-C devices fall prey! Our blocker ensures comprehensive protection against malware, viruses, and hacking threats, guaranteeing data integrity and privacy, thanks to its no data pins feature
- Juice Jacking Shield: Our robust solution stands guard against data theft, ensuring your personal information remains secure from unauthorized access
- Perfect USB C-to-C Compatibility: Our USB C male to USB C female data blocker ensures seamless data security across all your Type-C tech gadgets including iPhone 15, 16 & 17 series, Galaxy S25 S24 S23 S22 S21, Fold & Flip Series, USB-C iPad, Android Tablets, MacBooks, and more
- Safe and Uncompromised Fast Charging: Experience worry-free charging of up to 240W PD, whether you're at hotels, airports, university libraries, or outdoor charging stations. With fast charging capabilities, your devices remain safeguarded wherever you go.
const outputMetadata = await sharp('output.jpg').metadata();
console.log({
orientation: outputMetadata.orientation,
hasExif: Boolean(outputMetadata.exif),
hasIptc: Boolean(outputMetadata.iptc),
hasXmp: Boolean(outputMetadata.xmp),
hasIcc: Boolean(outputMetadata.icc)
});
These checks report whether metadata blocks are present; they do not by themselves prove that each desired field has the correct value or that an unwanted field is absent. For field-level verification, inspect the actual metadata values with a suitable metadata tool or library.
Recommended Free Tools
How to choose between stripping and retaining
| Approach | Attribution and rights | Privacy exposure | Technical output considerations | Best fit |
|---|---|---|---|---|
| Sharp default output | Embedded attribution may be removed. | Removes metadata broadly, reducing embedded exposure. | Also removes EXIF-based orientation; output is converted to device-independent sRGB. | When metadata removal is the priority and required attribution is preserved elsewhere. |
keepMetadata() |
Retains metadata categories that may contain attribution and rights information. | Can retain location and other sensitive fields. | Retains EXIF, ICC, XMP, and IPTC broadly. | When broad metadata retention is acceptable and sensitive fields have been considered. |
withMetadata() |
Retains most EXIF, XMP, and IPTC metadata. | Can retain location and other sensitive fields. | Adds a web-friendly sRGB ICC profile where appropriate and permits orientation and density updates. | When broad retention plus Sharp’s documented color, orientation, or density handling suits the output. |
There is no universal legal answer in these sources about which rights fields must be retained. IPTC notes that rights-related values can be affected by regional law and contracts. Metadata can communicate attribution or rights information, but it does not by itself determine ownership or licensing. Confirm applicable destination requirements and agreements rather than relying on an embedded field as a legal conclusion. See the IPTC Photo Metadata User Guide.
Quick Recap
Best Value
- Attach between your USB cable and charger to physically block data transfer / syncing; Charge mobile devices without any pop-ups or risk of hacking / uploading viruses in cars, airports etc
- This is our USB-A to A version, USB-C and others available; Read below if its the right one for your device
- The only data blocker to physically show you that its blocking data and several other great features; See full details below
- Allows charging without any risk of hacking / uploading viruses, can charge from an office PC even if USB socket has been disabled without breaking IT policy
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.

