[wp-trac] [WordPress Trac] #51780: Add ability to easily get path to sized images (such as parameter to get_attached_file() or wp_get_attachment_thumb_file())

WordPress Trac noreply at wordpress.org
Tue Feb 28 23:20:25 UTC 2023


#51780: Add ability to easily get path to sized images (such as parameter to
get_attached_file() or wp_get_attachment_thumb_file())
-------------------------------------------------+-------------------------
 Reporter:  paulschreiber                        |       Owner:  joedolson
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.2
Component:  Media                                |     Version:  5.5.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:
  opinion changes-requested                      |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 @joedolson Ah I see, this is about paths, that's what I had missed. :)

 In that case I would rather suggest we introduce a new function for that
 purpose, e.g. `wp_get_attachment_image_path( $attachment_id, $size )`.
 That may be a useful enhancement for 6.3, and that way we build the image
 specific functionality into a new image specific function.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51780#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list