Media: Correct the HEIC upload error message in the Media Library - #12829
Media: Correct the HEIC upload error message in the Media Library#12829itzmekhokan wants to merge 4 commits into
Conversation
The Media Library uploader stated that the image "cannot be displayed in a web browser". That is not accurate: HEIC images render fine in Safari and other browsers that support the format. The message is shown when the server's image editor cannot handle the `image/heic` mime type, and the same string is sent to every browser. It therefore cannot state whether the visitor's own browser can display the image, only that some browsers cannot. Reword the first sentence accordingly and keep the existing suggestion to convert to JPEG before uploading. Fixes #65800.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the 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. |
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. |
There was a problem hiding this comment.
🟢 Ready to approve
The change is a straightforward copy correction with only a minor optional punctuation tweak suggested in review comments.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Updates the Media Library uploader’s HEIC-related warning copy to avoid incorrectly asserting that the image “cannot be displayed in a web browser,” aligning the message with the reality that browser support varies.
Changes:
- Rewords the first sentence of the
unsupported_imagePlupload localization string to indicate the image may not display in all browsers. - Keeps the existing recommendation to convert the image to JPEG before uploading.
File summaries
| File | Description |
|---|---|
| src/wp-includes/script-loader.php | Adjusts the Plupload unsupported_image localized error string shown during uploads. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
adamsilverstein
left a comment
There was a problem hiding this comment.
please update the string to reflect the actual problem.
The message is shown when the server's image editor cannot handle image/heic, so it should name that cause rather than browser support.
|
Thanks for working on this! This is fine to commit as it is a marked improvement. With that said, it doesn't address or match the error message one sees in the block editor. In particular, it doesn't point people to using a different browser or talk about how if they use a different browser, it would work. I would like to see this addressed beyond just correcting the wrong info in the current error message, in line with the PR happening here: WordPress/gutenberg#81130 |
Will do!
Ah good point! For 7.2 I'm hoping to land client side media uploading in the media library, which would let us leverage the same error messages from WordPress/gutenberg#81130 directly. See: |
The Media Library uploader stated that the image "cannot be displayed in a web browser". That is not accurate: HEIC images render fine in Safari and other browsers that support the format.
The message is shown when the server's image editor cannot handle the
image/heicmime type, and the same string is sent to every browser. It therefore cannot state whether the visitor's own browser can display the image, only that some browsers cannot.Reword the first sentence accordingly and keep the existing suggestion to convert to JPEG before uploading.
Trac ticket: https://core.trac.wordpress.org/ticket/65800
Use of AI Tools
N/A
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.
Proposed commit message