Skip to content

[3.x] Bound Cloud upload metadata#159

Merged
timkelty merged 7 commits into
3.xfrom
bugfix/exif-dimensions
Jun 3, 2026
Merged

[3.x] Bound Cloud upload metadata#159
timkelty merged 7 commits into
3.xfrom
bugfix/exif-dimensions

Conversation

@timkelty
Copy link
Copy Markdown
Contributor

@timkelty timkelty commented Jun 3, 2026

Description

Keeps Cloud asset metadata reads bounded and server-owned after direct uploads.

This avoids trusting browser-reported file metadata and prevents image probing from pulling full uploaded objects through the app worker.

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: f7268379a4

ℹ️ 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/fs/Fs.php
}

try {
$imageSize = Image::imageSizeByStream($stream);
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 Support all image formats when reading dimensions

When a direct upload is an allowed image type other than JPEG/GIF/PNG (for example WebP, SVG, AVIF, TIFF, or BMP), this now records null dimensions because Craft’s Image::imageSizeByStream() stream parser only recognizes JPEG, GIF, and PNG signatures. Those formats were previously able to supply dimensions from the client, so uploads can now show no dimensions and can fail asset selection rules that depend on width/height even though Craft allows the file kind.

Useful? React with 👍 / 👎.

@timkelty timkelty force-pushed the bugfix/exif-dimensions branch from f726837 to 6dcf382 Compare June 3, 2026 15:54
@timkelty timkelty merged commit c3c4d35 into 3.x Jun 3, 2026
9 checks passed
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