#10532 closed enhancement (invalid)
Changes to hook image_make_intermediate_size
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Currently we have the filter 'image_make_intermediate_size' in WordPress that allows plug-ins to rename/move the intermediate image file after it was created. In order to modify the image, e.g. to add watermarks, plug-ins first have to explicitly load the image although it was in memory just moments ago.
Changing the filter image_make_intermediate_size to receive the image handle in addition to the filename would allow plug-in creators to write more efficient code by reusing the image resource before it is destroyed. This can be accomplished by relocating the filter invocation into the image_resize function.
Change History (5)
- Milestone changed from 3.0 to Future Release
comment:4
markoheijnen — 6 weeks ago
- Milestone Future Release deleted
- Resolution set to worksforme
- Status changed from new to closed
The filter can't be used for getting the image resource because of the changes in #6821. Closing this ticket since you now can create your own Image Editor. If there is something I missed please create a new ticket with details how it should now be implemented.
comment:5
SergeyBiryukov — 6 weeks ago
- Resolution changed from worksforme to invalid

Perhaps it would be better to add another filter before saving the new image in image_resize(). This would allow more processing while the image is still in memory and also catch instances where the function is called directly.