Tutorials

Claude Opus 5.5: Fix Sideways Product Photos After Upload

Use Claude Opus 5.5 to trace where image pixels and orientation metadata stop agreeing.

A silver ring, a loupe magnifying its brushed texture, and smaller photographic prints.

Use Claude Opus 5.5 to trace where image pixels and orientation metadata stop agreeing. Ask for a diagnosis across the original file, processed derivative and browser display before requesting a rotation. A screenshot alone cannot tell you whether a photograph needs turning or has already been turned twice.

Collect three versions of one photograph

Keep an untouched camera original. Export metadata for that original and for the exact derivative served to the page, then record the browser preview. Include dimensions, EXIF Orientation, processing steps and library version. Identify which file each observation describes; a cached thumbnail may differ from the latest uploaded object.

A November 2024 developer report initially blamed the browser, then traced double rotation to an older image-processing library. That is one reported case, not proof of the cause in your pipeline. Its useful lesson is to inspect both transformations and tags.

EvidenceLikely investigationFirst action
Original looks right only in some viewersOrientation tag interpretationRead original metadata
Derivative pixels turned but old tag retainedOrientation applied twiceInspect output tag and pipeline
Preview right, downloaded export wrongDifferent processing pathsCompare exact derivative files
Rotation right, label mirroredFlip operation or mirrored orientationCheck asymmetric label details

Normalize once before defining the crop

Consider a hypothetical 4032 × 3024 photograph with Orientation 6. After the indicated quarter-turn its upright dimensions are 3024 × 4032. A centered square crop would use a 3024-pixel side and remove 504 pixels at each vertical edge. Those dimensions and offsets are arithmetic, not proof that the product fits the crop: a tall bottle may need a different composition.

Sharp's operation reference documents autoOrient as applying EXIF orientation, including mirroring when needed, then removing that tag. Its handling of EXIF does not settle conflicting orientation stored elsewhere. Check the documentation matching your installed version and inspect the output instead of stacking an unconditional 90-degree rotation after normalization.

For a static JPEG, a candidate pipeline is:

const output = await sharp(input)
  .autoOrient()
  .resize({ width: 1600, withoutEnlargement: true })
  .webp()
  .toBuffer();

This example intentionally avoids a crop. Preserve the original, write a new derivative and confirm its orientation and dimensions. A rotated CSS preview does not repair downloaded pixels. MDN's image-orientation reference helps distinguish display behavior from file processing.

Give Opus a reproducible diagnosis prompt

Diagnose the supplied product-photo orientation problem. Inputs: untouched original, exact served derivative, metadata for each, browser screenshot, processing code and installed library version. Name any missing input before proposing a fix.
Build a table of file, pixel dimensions, EXIF Orientation, transformation already applied and observed display. Separate observations from hypotheses. Check whether a rotation or mirror has already been baked into the pixels while an old tag remains.
Propose the smallest change that normalizes orientation once before resize or crop. Preserve originals and product-label identity. Do not add unconditional rotation or claim a screenshot proves metadata. Explain the coordinate system for any crop.
Return a patch, a rollback path and tests for normal, rotated and mirrored inputs. Compare preview and download. If you cannot run the processing tools, return the commands and mark them unexecuted. Do not claim success without inspecting output files.

This is a proposed Opus workflow, not a model benchmark. Use an asymmetric label or a harmless corner marker in test fixtures so a mirror cannot pass merely because a bottle looks symmetrical. For each supported orientation, verify the upright result, label direction and unchanged intended framing. Include a file with no orientation tag and an already-normalized derivative.

Troubleshooting and handoff

**Can I remove EXIF first?** Removing the orientation instruction before applying it can leave sideways pixels with no correction information. Decide the transformation from the original metadata before removing it.

**Why does only one card look wrong?** Confirm its served URL and cache version. Regenerating the full catalog is premature until one source-to-derivative chain reproduces the error.

**Does this also fix a bad crop?** No. Orientation establishes the coordinate system; responsive image selection and composition are separate checks.

Once the upright reference is approved, bring it into Panelly Studio to develop complete product-ad images. Keep the corrected file as the reference and check label direction in the resulting creative. Panelly is not claimed to include an Opus integration or this processing pipeline.

Sources and further reading

Four panels. One ad.

Your next ad starts here.

Describe your product, its benefits and its audience. Create a four-panel ad with Panelly.

Start creating ↗View credit packs