studio
studio copied to clipboard
I can't upload webp file into Media Library
Quick summary
Users can't upload webp files in Studio. It looks like it doesn't work in https://playground.wordpress.net/, too.
Steps to reproduce
- Download webp file from https://developers.google.com/speed/webp/gallery1
- Create a site in Studio and open WP Admin
- Navigate to Media -> Add New Media File
- Drag the downloaded file to upload it
What you expected to happen
The file is uploaded.
What actually happened
Error is displauyed
Impact
Most (> 50%)
Available workarounds?
Yes, easy to implement
Platform
Mac Silicon
Logs or notes
No response
Currently, there is a workaround to upload webp files:
If a user renames the file from .webp to .jpg, then the file uploads correctly and with the correct extension (webp).
This workaround works in Playground and Studio.
Screencast
Here you can see the error and the workaround:
https://github.com/Automattic/studio/assets/779993/0537b06b-2d9a-4dbd-b245-164c630563fd
📌 REPRODUCTION RESULTS
- Tested on Studio - Partially
📌 FINDINGS/SCREENSHOTS/VIDEO
- Uploading directly to the media library - fails ❌
- Dragging into the editor - works ✅
- Uploading through the editor via Image Block - works ✅
https://github.com/Automattic/studio/assets/14153300/e3ced420-409c-4e4f-82cc-699874455f78
📌 ACTIONS
- Triaged
Just following up on this one - it seems like WebP support in Studio would be resolved when the changes from https://github.com/WordPress/wordpress-playground/pull/1393 are published (and the @php-wasm/node dependency can be updated in Studio).
@sejas Does that sound correct? Anything else that can be done to help?
Exactly! That's correct! 👌 If you want, you can ask the Playground team to release a new version. If not, I can do it tomorrow morning. Thanks!
@derekblank , php-wasm/node has been released with v0.7.20 https://www.npmjs.com/package/@php-wasm/node 👍
This has been fixed after updating the playground dependencies: https://github.com/Automattic/studio/pull/491 Kudos to @kozer and @jeroenpf ! 🎉
It will be available in the next Studio release.
I tested trunk, and I've been able to upload a webp image: