#62359 closed defect (bug) (fixed)
Converted images have the dimension suffix added to the full size image.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.7 | Priority: | normal |
| Severity: | normal | Version: | 6.7 |
| Component: | Media | Keywords: | has-patch has-unit-tests reporter-feedback commit |
| Focuses: | Cc: |
Description
When an image format is auto converted to a web safe file type, the full size image of the converted file is given the dimensions suffix. Eg peggy.heic will become peggy-1000x750.jpeg.
To avoid confusion, it would be preferable if the image either had no suffix, eg peggy.jpeg or a suffix to indicate it has been converted, eg peggy-converted.jpeg. My preference is for the former.
I've put this on the 6.7 milestone for resolution as once WP 6.7 is released, back-compat requirements kick in and the dimension suffix would need to be retained.
As discussed with @flixos90 and @mukesh27 on PR#7733.
Attachments (1)
Change History (16)
This ticket was mentioned in PR #7748 on WordPress/wordpress-develop by @peterwilsoncc.
13 months ago
#1
- Keywords has-patch added
Remove the dimension suffix from the full size image when converted to a web safe type.
This prevents the full size image file names from having the same form as a sub-sized image, filename-widthxheight.ext. Instead the file name uses the original name with the new extension.
Trac ticket: Core-62359
This ticket was mentioned in Slack in #core by chaion07. View the logs.
13 months ago
This ticket was mentioned in Slack in #core by stoyangeorgiev. View the logs.
13 months ago
#4
@
13 months ago
- Keywords has-unit-tests added
Thanks for the ticket, PR, and sample image, @peterwilsoncc!
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/7748
Environment
- Hardware: MacBook Pro Apple M1 Pro
- OS: macOS 14.6.1
- Browser: Safari 17.6
- Server: nginx/1.27.2
- PHP: 8.2.25, ImageMagick support
- MySQL: 8.0.27
- WordPress: 6.8-alpha-59274-src
Actual Results
- ✅ Converted image was saved with the new extension, without the dimensions suffix (
-{widthx}x{height}). - ✅ Image exceeding the big image threshold was saved with the
-scaledfilename suffix (not affected by this patch).
Supplemental Artifacts
Uploading adorable sample image before (peggy.heic) and after (peggy-1.heic) applying patch:
13 months ago
#5
Just tested this again (manually) and all seems to work properly.
- The name of the originally uploaded HEIC image is preserved after converting it, only the extension is different.
- If a file with the target name already exists, the name of the uploaded image is properly incremented. I.e. if
image.jpgalready exists in the uploads directory, and the user uploadsimage.heic, the latter is saved asimage-1.heic, and all resulting sub-sizes and converted images have the-1suffix.
#7
@
13 months ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 59379:
@peterwilsoncc commented on PR #7748:
13 months ago
#8
Merged r59379 / https://github.com/WordPress/wordpress-develop/commit/e1f052ec31acfb1ce5f3764ed3ccc1ee00a56f0b
Thanks all for helping get this over the line.
#9
@
13 months ago
- Keywords dev-feedback added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 6.7 backport consideration following another committers signoff.
#11
@
13 months ago
- Keywords reporter-feedback commit added; dev-feedback removed
Working on backporting these now for RC5.

Test HEIC image of a cat wishing its human would leave it alone.