Skip to content

fix(editor): upload a WebP unchanged whenever it fits the size limit - #223

Merged
m1ngsama merged 1 commit into
mainfrom
fix/editor-webp-passthrough-by-size
Oct 21, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
fix/editor-webp-passthrough-by-size

Conversation

@m1ngsama

Copy link
Copy Markdown
Member

Refs #216, follows #220. #220 skipped the encode only for a WebP of 1600 px or less on its long edge. The photo library's download is 2560 px, so the editor still encoded it again. Now any WebP within the 4 MB upload limit goes up unchanged. Other formats and larger files are resized and encoded as before.

Scope: CI or tooling. pnpm run ci:lint, pnpm test -- --run and pnpm docs:build pass. I did not test the upload in a browser, and toWebp has no unit test.

The pixel limit also forced an encode for a 2560 px photo library download,
a file that is already small. Only the byte limit decides now.
@m1ngsama
m1ngsama requested a review from sheepkinn as a code owner October 21, 2026 09:33
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying documents with  Cloudflare Pages  Cloudflare Pages

Latest commit: d887059
Status: ✅  Deploy successful!
Preview URL: https://852cf86f.documents-dq4.pages.dev
Branch Preview URL: https://fix-editor-webp-passthrough.documents-dq4.pages.dev

View logs

@m1ngsama
m1ngsama merged commit 5615684 into main Oct 21, 2026
5 checks passed
@m1ngsama
m1ngsama deleted the fix/editor-webp-passthrough-by-size branch October 21, 2026 09:38
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