Repository navigation
Media: Allow sideloading sub-sizes in the attachment's output format on multisite - #15952
adamsilverstein wants to merge 2 commits into
Conversation
…ype. On the classic path, the image editor writes sub-sizes to disk directly, so a network that does not allow WebP uploads still gets WebP sub-sizes when `image_editor_output_format` asks for them. With client-side media processing, the browser transcodes each sub-size to that format and sideloads it, and the sideload is checked against the network's allowed upload file types, so it is rejected with "Sorry, you are not allowed to upload this file type." Networks created before WordPress 5.8 have no `webp` in `upload_filetypes`, and upgrades never add it. The first test is the classic baseline and passes. The second fails until the sideload endpoint allows the attachment's own output format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on multisite. The image editor writes sub-sizes to disk in the format `image_editor_output_format` asks for, without checking it against the network's "Upload file types" setting. With client-side media processing the same sub-sizes are sideloaded, and each one was rejected when its format was missing from that setting, as it is for WebP on networks created before 5.8. Exempt the attachment's own output format from the network setting for the duration of a sideload, so both paths accept the same files. Any other file type is still rejected. See #66681.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
adamsilverstein
left a comment
There was a problem hiding this comment.
Code looks good, running manual testing.
|
Tested this in a browser on a real multisite network, before and after the fix. Claude ran the manual test and recorded both screencasts, its notes:
That covers the "not yet tested in a browser" gap from the description. |


Claude Code worked through this one with me, its write-up of the change:
Trac ticket: https://core.trac.wordpress.org/ticket/66681
AI Use
Claude Code wrote the fix, the extra test and this description from my direction; the first two tests are from #15859. I will review and test.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.