How to keep photo credit when you remove GPS data
Sharp and Pillow handled attribution and location differently depending on what the export copied. Here’s what happened in 72 JPEG, WebP and AVIF exports.
72 controlled exports from 3 synthetic JPEGs
Abstract
In 72 test exports, writing a fresh XMP packet with only the approved attribution fields preserved every supplied rights value and left out the test coordinates in 18 of 18 cases. Copying the source XMP packet met both conditions in 6 of 18. It kept a second copy of the coordinates when they were also in XMP and lost attribution when it was stored solely in EXIF. If you need both outcomes, check the exact exported file for the fields you want to keep and the coordinates you want to leave out. [1][2][3]
A photographer sends your team a full-size JPEG for a campaign. You need smaller files for the landing page and partner kit. The photographer’s name and usage information should travel with the files. The point where the photo was taken can stay private. The preview may look right even when either of those decisions went wrong.
EXIF and XMP are ways to store information inside an image file. Camera settings and coordinates often live in EXIF. An XMP packet can carry several kinds of information at once, including IPTC photo metadata such as Creator and Credit Line. It can carry GPS coordinates too. That makes the choice of which fields to include more precise than the choice of which packet to copy. [1]
One photo can carry credit and coordinates

What each export kept
We exported each of 3 JPEG fixtures with 2 tools into 3 formats under 4 metadata settings. Without explicit metadata settings, all 18 copies lost the supplied rights fields and the test coordinates. Explicitly copying source EXIF and XMP kept all the supplied rights fields and the coordinates in all 18. The setting that wrote a fresh XMP packet with only approved fields kept the supplied rights values and excluded the test coordinates in all 18, including the fixture whose creator and copyright had originally lived in EXIF. [2][3]
The counts describe the test matrix. Each setting used the same fixtures, tools and output formats. The 18 files in one row are variations on a planned comparison, so the table should help you choose what to check in an export. It cannot estimate how often photos from other sources carry a particular tag.
Attribution and GPS in the tested exports
Each setting produced 18 files. The last column counts files that met both conditions.
| Export setting | Kept all rights values | Kept GPS | Met both conditions |
|---|---|---|---|
| Default export | 0 | 0 | 0 |
| Copy source EXIF and XMP | 18 | 18 | 0 |
| Copy source XMP only | 12 | 6 | 6 |
| Write only approved XMP fields | 18 | 0 | 18 |
Where photo credits and location details are stored
In the first fixture, attribution was in XMP and GPS was only in EXIF. Copying XMP met both conditions in all 6 versions of that fixture. In the second, the same GPS point was represented in both places. Copying XMP kept the attribution and the XMP coordinates in all 6 versions, even though the EXIF coordinates were gone.
The third fixture had its creator and copyright in EXIF, with no separate credit line or rights URL in the source. Copying XMP retained neither rights field in any of its 6 versions. With the approved values written into fresh XMP, both values traveled in every output. The experiment treated an absent credit line or URL as inapplicable for that fixture. [1]
Check the image before you share it
For a campaign handoff, record the source asset and the exact values approved for the public copy, such as the photographer’s name, the credit line, the copyright notice and a link to the rights statement if supplied. Keep the original intact. Build the export from a reviewed list of fields and inspect the final derivative locally. A visible caption is a separate place to credit a photographer. Where the credit needs to follow the file, check the embedded value too. [1]
Suppose your landing page uses AVIF and your partner kit contains JPEG. Compare both exported files against the same list. Look for the approved credit and check coordinates in EXIF and XMP. If a website converts the file again, repeat the check on the version actually served. Check separately for place names in descriptions or details visible in the picture when the location needs to stay private.
Build and check the public copy

List approved values
Save the exact attribution and rights values that should travel with this photo.
Write a fresh packet
Include the approved fields and leave out the test location fields.
Inspect the derivative
Compare its embedded fields against the approved list and check for GPS in EXIF and XMP.
The ZIP includes the synthetic files, 72 observations, scripts and replay instructions in English.
Methods
We resized 3 synthetic 128 × 96 JPEGs to 64 × 48 and encoded JPEG, WebP and AVIF at each tool’s quality setting of 80. The tested versions were Sharp 0.35.5 and Pillow 12.2.0 on Apple silicon. The test ran on November 19, 2026. Each fixture used the same generated pixels and a synthetic GPS point. The source metadata differed by design. [2][3]
ExifTool 13.59 read the fields from the exported files. An independent check decoded every image with Pillow and parsed the XMP as XML. Both readers agreed on all tracked fields in the 72 outputs. ExifTool flagged a minor EXIF header warning on the 3 Sharp WebP files that explicitly copied EXIF and XMP. Both readers still recovered the values. [4]
A file met both conditions when it retained every value supplied for that fixture and neither reader found the test coordinates in EXIF or XMP. We checked those fields in local exports. A platform upload, visible credit, image quality and other forms of location disclosure would require separate checks.
Sources and notes
- IPTC Photo Metadata Standard 2025.1, definitions of Creator, Credit Line, Copyright Notice and Web Statement of Rights.
- Sharp output API, options for reading source metadata into the output or writing fresh XMP.
- Pillow image-file formats, save options for JPEG, WebP and AVIF.
- ExifTool 13.59, the primary metadata reader used in the export checks.
All editions report the same 72 controlled exports.