Opened 8 months ago
Closed 4 months ago
#61428 closed defect (bug) (fixed)
Inconsistent image scaling error
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | 6.6 |
Component: | Media | Keywords: | has-patch has-testing-info reporter-feedback |
Focuses: | Cc: |
Description
Here is how you can reproduce the error:
- Let's say the original res of my image is 356 x 216
- Edit the image, and downscale it to 200 x 121 and save it.
- Now edit the image again, and click on RESTORE ORIGINAL IMAGE
- Click on Scale button again and change the resolution to something like 230 x 139
- You will see a warning like this: "Images cannot be scaled to a size larger than the original."
- Since the original image was 356 x 216 and we also restored the original resolution after downscaling, the above error doesn't seem correct at this point.
Here is a video link reproducing the error: https://www.dropbox.com/scl/fi/14w4wf5qgdudjl9temqyr/media-size-limit-scale-bug.mp4?rlkey=p992w2xpvql4twvfc66egta51&st=csvui9ji&dl=1
Attachments (1)
Change History (18)
#1
@
8 months ago
- Keywords has-patch added; needs-patch removed
Kindly test and review the patch, and let me know if any improvements are required.
Thanks!
This ticket was mentioned in Slack in #core by gauravsingh7. View the logs.
8 months ago
This ticket was mentioned in PR #6821 on WordPress/wordpress-develop by gauravsingh777.
8 months ago
#3
TRAC: https://core.trac.wordpress.org/ticket/61428
Fixed the incorrect scaling message when an image is downscaled after it's been restored to its original size
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
8 months ago
#5
@
8 months ago
- Milestone changed from Awaiting Review to 6.7
- Owner set to joedolson
- Status changed from new to accepted
#6
@
8 months ago
I have tested the patch for this trac ticket but the issue is not yet resolved, I have attached the screen-recording about the error message that is comming up for the re-scaling the image.
Screen-recording URL:- https://drive.google.com/file/d/1kb6eCwihdSMRR0gTJA1BgwxhNy5T-jNA/view?usp=drive_link
Environment
- WordPress: 6.7-alpha-58576-src
- PHP: 8.2.20
- Server: nginx/1.27.0
- Database: mysqli (Server: 8.0.37 / Client: mysqlnd 8.2.20)
- Browser: Chrome 126.0.6478.127 (macOS)
- Theme: Twenty Twenty-Four (twentytwentyfour) 1.1
#8
@
7 months ago
Hi @rishavdutta
It's possible the js file was not refreshed on your build.
Since the js file changes was added in /src/js/_enqueues directory, you'll need to build the project again so that the file is included at its correct location.
Can you confirm if you rebuilt it (npm run dev) and still got the same issue?
#9
@
7 months ago
Hi @gauravsingh7,
Yes, I have tested the patch again, after refreshing the build files. Now, it's working fine as expected, the error message is not coming up.
Reference Screenshot - https://drive.google.com/file/d/1yuutSFb4zdxu47SgN1xGiNJ4fyzOlBUZ/view?usp=sharing
Environment
- WordPress: 6.7-alpha-58576-src
- PHP: 8.2.20
- Server: nginx/1.27.0
- Database: mysqli (Server: 8.0.37 / Client: mysqlnd 8.2.20)
- Browser: Chrome 126.0.6478.127 (macOS)
- Theme: Twenty Twenty-Four (twentytwentyfour) 1.1
Thanks for the patch,
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
6 months ago
#12
@
6 months ago
Hi! I'm working on this issue, but I'm not able to reproduce the problem using the video steps as a reference on trunk. Before spending a lot of effort trying to figure out how to reproduce it, can I ask somebody who has already reproduced the issue to verify whether or not they can produce it using the current trunk version of WordPress?
I *can* reproduce it in WordPress 6.6; but it's possible that this was fixed incidentally, and I want to be able to verify that.
This ticket was mentioned in Slack in #core by chaion07. View the logs.
4 months ago
#15
@
4 months ago
@joedolson , I am also unable to replicate the issue on the trunk branch, it might've been fixed already.
#16
@
4 months ago
@joedolson I’m also unable to replicate the issue on the trunk using the video steps as a reference.
#17
@
4 months ago
- Resolution set to fixed
- Status changed from accepted to closed
With three separate reports unable to replicate the issue, I'm going to close this issue as fixed. I don't know for sure where it was fixed; but I would guess it was likely in [58915].
If somebody does reproduce this again in the future, don't hesitate to reopen and provide whatever additional details are necessary to reproduce.
Adding a patch for fixing this issue!