[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
Thu Oct 21 17:32:39 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 Denis-de-Bernardy):

 _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. 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);
 }}}

 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.

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


More information about the wp-trac mailing list