Opened 6 years ago
Last modified 5 years ago
#48111 assigned defect (bug)
Update usage of `multi_resize` to utilize new `wp_create_image_subsizes()` function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Media | Keywords: | needs-patch |
Focuses: | Cc: |
Description
As mentioned in https://core.trac.wordpress.org/ticket/40439#comment:61
There are two uses of multi_resize()
that will need to be updated to use the new wp_create_image_subsizes()
function introduced in #40439.
- In the image editor (
src/wp-admin/includes/image-edit.php
). - In PDF Thumbnails/Fallback Thumbnail Support (
src/wp-admin/includes/image.php
).
Attachments (3)
Change History (20)
This ticket was mentioned in Slack in #core by antpb. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-media by mike. View the logs.
6 years ago
#5
in reply to:
↑ 3
@
6 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Replying to progremzion:
Unfortunately 48111.patch doesn't work as expected. We can switch to the new wp_create_image_subsizes()
or _wp_make_subsizes()
but that may also need handling of PHP fatal errors while processing images.
Also it introduces a regression in _wp_make_subsizes()
. It should be able to fall back to $editor->multi_resize()
in case a plugin adds another class for processing images that is missing the new make_subsize
method.
(Also next time could you make diffs from the root WP dir, the parent of /src).
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
6 years ago
#7
@
6 years ago
- Milestone changed from 5.3 to Future Release
Punting -- we're running out of time. If you can commit before RC1, excellent!
#8
@
6 years ago
- Milestone changed from Future Release to 5.3
I'd like this in the 5.3 milestone still -- I'll take care of moving it if necessary.
Thanks!
This ticket was mentioned in Slack in #core-media by mike. View the logs.
6 years ago
#11
@
6 years ago
- Keywords has-patch needs-testing added; needs-patch removed
In 48111.2.patch: use the new _wp_make_subsizes()
when creating image thumbnails for PDFs (untested).
Unfortunately this is not as straightforward to implement for the image editor. It was designed to "wait" for all operations to complete before it saves all the meta data, including the meta "backup" for previous versions of the image. I'll need a refactoring, best to do in 5.4.
#12
@
6 years ago
@azaozz Thanks so much!
I had been working on this separately and had something very similar, but this covers more cases!
Went ahead and updated the automated tests to account for the change in image generation order.
You'll find 48111.2.patch + those changes in 48111.3.patch.
So far in testing, things are working as expected.
#14
@
6 years ago
- Keywords needs-patch added; has-patch needs-testing removed
- Milestone changed from 5.3 to 5.4
- Type changed from task (blessed) to defect (bug)
Left here is moving the image editor to use _wp_make_subsizes()
.
I agree this is more complicated and think it's fine to ship with the other parts of WordPress supporting the functionality.
To keep the conversation in the same place, going to move this to 5.4 for consideration, and change it from a task for clarity.
#15
@
5 years ago
@mikeschroder How do you feel about this ticket for 5.4 given that Beta 3 is a few days away?
#16
@
5 years ago
- Milestone changed from 5.4 to Future Release
Hi,
With 5.4 Beta 3 approaching and the Beta period reserved for bugs introduced during the cycle, this is being moved to Future Release. If any maintainer or committer feels this should be included or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.
Hi @antpb
I have fixed the issue. Can you please review? I am new to core contribution, so please do let me know if something is missing.
Thanks!