Describe the Bug
When uploading images that have an EXIF orientation greater than 1, Payload appears to normalize orientation on upload, but crop operations still fail. This seems related to the fix for upload orientation:
In my reproduction, cropping EXIF-rotated images causes one of two outcomes:
- Crop saves, but the resulting image is rotated/flipped incorrectly
- Crop cannot be saved and throws
ERROR: extract_area: bad extract area.
Expected behavior
Cropping EXIF-rotated images should succeed and preserve the correct visual orientation in the saved output.
Actual behavior
Cropping either:
- produces incorrectly oriented output, or
- fails with
extract_area: bad extract area
Link to the code that reproduces this issue
https://github.com/robinvangestel21/payload-crop-rotate-reproduction
Reproduction Steps
- Clone the reproduction repo
- Install dependencies and run the app
- Open the media library and open an image with EXIF orientation > 1 (example images from: https://github.com/recurser/exif-orientation-examples)
Scenario 1: crop saves but output is wrongly rotated/flipped
- Use Landscape_2.jpg
- Crop the image by subtracting 1px from the width and 1px from the height.
- Save
- Observe saved media: orientation is incorrect (flipped/rotated).
Scenario 2: crop fails to save
- Use Landscape_8.jpg
- Crop the image by subtracting 1px from the width and 1px from the height.
- Save
- Observe terminal error:
ERROR: extract_area: bad extract area.
Which area(s) are affected?
area: core
Environment Info
Binaries:
Node: 24.14.1
npm: 11.11.0
Yarn: 1.22.22
pnpm: 10.32.1
Relevant Packages:
payload: 3.83.0
next: 16.2.3
@payloadcms/db-mongodb: 3.83.0
@payloadcms/graphql: 3.83.0
@payloadcms/next/utilities: 3.83.0
@payloadcms/richtext-lexical: 3.83.0
@payloadcms/translations: 3.83.0
@payloadcms/ui/shared: 3.83.0
react: 19.2.4
react-dom: 19.2.4
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:46 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 8
Describe the Bug
When uploading images that have an EXIF orientation greater than
1, Payload appears to normalize orientation on upload, but crop operations still fail. This seems related to the fix for upload orientation:In my reproduction, cropping EXIF-rotated images causes one of two outcomes:
ERROR: extract_area: bad extract area.Expected behavior
Cropping EXIF-rotated images should succeed and preserve the correct visual orientation in the saved output.
Actual behavior
Cropping either:
extract_area: bad extract areaLink to the code that reproduces this issue
https://github.com/robinvangestel21/payload-crop-rotate-reproduction
Reproduction Steps
Scenario 1: crop saves but output is wrongly rotated/flipped
Scenario 2: crop fails to save
ERROR: extract_area: bad extract area.Which area(s) are affected?
area: core
Environment Info