[wp-trac] [WordPress Trac] #15149: image_get_intermediate_size partly ignores 'path' and 'url' fields and has inconsistent return values

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 27 15:47:27 UTC 2010


#15149: image_get_intermediate_size partly ignores 'path' and 'url' fields and has
inconsistent return values
-------------------------+--------------------------------------------------
 Reporter:  whoismanu    |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  3.1            
 Severity:  normal       |    Keywords:  has-patch      
-------------------------+--------------------------------------------------

Comment(by whoismanu):

 Replying to [comment:6 Denis-de-Bernardy]:

 first of all i am sorry for my late reply. i am in the middle of
 relocating and changing jobs, so not that much time at hand these days...

 > _wp_attached_file is what gets used for the actual file management part
 internally. Playing with the upload dir is, to a large extent, desirable
 when spreading files around if you want images in wp-content/images rather
 than wp-content/uploads/images.
 >
 > I think you misunderstood what I was meaning.

 Possible, but i think we are slowly getting there :-)

 >Currently, the base image file corresponds to _wp_attached_file, and we
 toggle the file name. What I suggested in my above comment was to split
 _wp_attached_file into _wp_attached_file and _wp_attached_dir, and to have
 the main image map that, and to have the smaller sized images map that as
 well. And all of it filtered:
 >
 > {{{
 > $thumbnail_image_url = apply_filters('whatever', $filtered_base_url .
 $filtered_dir . $file_name);
 > }}}
 >

 sounds good and definitely more flexible.

 > And similar code for the path, so as to allow plugins to change where it
 gets stored if relevant.
 >
 > It's like, if we break backwards compatible, might as well do it
 completely but in a way that allows full flexibility.

 sure, that sounds perfectly reasonable to me. i guess that a lot of the
 image_ functions (image_downsize(), image_get_intermediate_size(),
 image_make_intermediate_size()...) inside wp-includes/media.php will be
 affected by such a change.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15149#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list