WP_Image_Editor - image_resize_dimensions called twice
|Reported by:||alexvorn2||Owned by:|
Problem 1: - Prevent calling the image_resize_dimensions function twice.
When we need to resize an image we need first check if the resized image file name exists and after that - resize.
For checking if the resized image exist we need the new width and height that we can get from image_resize_dimensions(),
and after that we resize, using the resize function from the class, in the function we have image_resize_dimensions function too, so it happens that it is called twice...
Problem 2 - Cropping image position
For example we cropped an image with a 'top' position, (default crop is center position)
and after that if we will want a new position like center or bottom, or right/left we should delete the old cropped image before cropping the new one.
Problem 3 no documentation, no examples
this new class was integrated to fast, and the old functions were deprecated in the favor of this class, why? why not to deprecate in future versions?
No documentation and examples in codex, so the theme developers should found but itself how to integrates this new option of resizing images before the new version of WordPress to come out (release).
Change History (13)
- Summary changed from WP_Image_Editor - image_resize_dimensions called twice, cropping position to WP_Image_Editor - image_resize_dimensions called twice
comment:9 in reply to: ↑ 8 ; follow-up: ↓ 10 @alexvorn2 — 2 years ago
comment:10 in reply to: ↑ 9 @DH-Shredder — 2 years ago
- Cc mike.schroder@… added
- Severity changed from normal to minor
- Type changed from defect (bug) to enhancement