Commit 620b66b
Media: Update post mime type when image format is converted during upload.
When uploading HEIC files via the media library on servers that support
HEIC, the image is correctly converted to JPEG on disk but the
attachment post's `post_mime_type` remained `image/heic`. This updates
`_wp_image_meta_replace_original()` to also update the post mime type
when the saved image format differs from the original.
Additionally fixes the REST API index to use `wp_get_image_editor_output_format()`
so the `image_output_formats` response includes the default HEIC-to-JPEG
mapping, enabling client-side media processing to be aware of it.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 5ec7922 commit 620b66b
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
212 | 226 | | |
213 | 227 | | |
214 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1383 | 1383 | | |
1384 | 1384 | | |
1385 | 1385 | | |
1386 | | - | |
1387 | | - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1388 | 1390 | | |
1389 | 1391 | | |
1390 | 1392 | | |
| |||
0 commit comments