[wp-trac] [WordPress Trac] #22512: WP_Image_Editor - image_resize_dimensions called twice
WordPress Trac
noreply at wordpress.org
Wed Nov 21 19:53:42 UTC 2012
#22512: WP_Image_Editor - image_resize_dimensions called twice
-------------------------+------------------------------
Reporter: alexvorn2 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: minor | Resolution:
Keywords: |
-------------------------+------------------------------
Changes (by DH-Shredder):
* cc: mike.schroder@… (added)
* type: defect (bug) => enhancement
* severity: normal => minor
Comment:
Replying to [comment:9 alexvorn2]:
What method were you using with the previous functions?
It'd depend on your implementation as to what's currently best. WordPress
knows what files are in its media library, and if they're not there, your
filesystem knows. If you really don't know what the final size of your
image will be, then calling image_resize_dimensions is exactly what you
want to do, and it isn't likely to cause performance problems.
As far as a framework to handle situations like this, I can see it
happening at some point in the future, but likely not within
WP_Image_Editor, since media library situations, and relationships to
previously generated images are beyond its scope.
If what you're looking for are improvements in how we handle resized
images, and their relation to the originals, I think this would fall
within #21810.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22512#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list