Skip to content

[3.x] Use native transforms for action requests#160

Closed
timkelty wants to merge 1 commit into
3.xfrom
timkelty/fix-cloud-exif-orientation
Closed

[3.x] Use native transforms for action requests#160
timkelty wants to merge 1 commit into
3.xfrom
timkelty/fix-cloud-exif-orientation

Conversation

@timkelty
Copy link
Copy Markdown
Contributor

@timkelty timkelty commented Jun 3, 2026

Description

Skip Cloud’s asset CDN transform override during Craft action requests so handlers like the image editor use Craft’s native transform pipeline.

This keeps image-editor preview URLs and server-side save/crop behavior in the same coordinate space, matching native Craft behavior for unsanitized CP uploads.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aabe5b8782

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/controllers/AssetsController.php Outdated

try {
Assets::downloadFile($asset->getVolume(), $asset->getPath(), $tempPath);
$this->normalizeUploadedImageOrientation($tempPath);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect EXIF rotation config before normalizing

On sites that set rotateImagesOnUploadByExifData to false, this still rotates every EXIF-oriented JPEG/TIFF because the new normalization runs unconditionally before Image::cleanImageByPath(). Craft’s image cleanup already gates EXIF rotation on that general config, so Cloud uploads now ignore a setting that native uploads honor; CP users who disabled EXIF rotation will see direct Cloud uploads saved with different pixels/dimensions than expected.

Useful? React with 👍 / 👎.

@timkelty timkelty force-pushed the timkelty/fix-cloud-exif-orientation branch from aabe5b8 to f29bc20 Compare June 4, 2026 10:52
@timkelty timkelty force-pushed the timkelty/fix-cloud-exif-orientation branch from f29bc20 to b513507 Compare June 4, 2026 10:56
@timkelty timkelty changed the title [3.x] Normalize EXIF-oriented Cloud uploads [3.x] Use native transforms for action requests Jun 4, 2026
@timkelty timkelty closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant