[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
Thu Aug 17 19:20:54 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:  closed
 Priority:  normal         |   Milestone:  6.4
Component:  Media          |     Version:  5.5.3
 Severity:  normal         |  Resolution:  fixed
 Keywords:  2nd-opinion    |     Focuses:
---------------------------+------------------------
Changes (by azaozz):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 As mentioned earlier I think the whole premise for this ticket is somewhat
 incorrect. The first line in the description says that:

 > Currently, you can call get_attached_file() and get the path to the
 full-sized version of the image.

 Technically that is not exactly true. You get the the path to the attached
 file which may be an image.

 I'm also not convinced that a separate helper function is needed to get
 paths to sub-size images. Currently this is easily done without a helper
 by using `image_get_intermediate_size()`. Even the name of that function
 suggests its usage.

 Re-closing this as fixed. Please feel free to reopen with more details why
 such helper function might be useful (although it seems a new enhancement
 ticket may be a better choice).

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


More information about the wp-trac mailing list