[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 Jun 15 19:47:00 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.4
Component: Media | Version: 5.5.3
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
---------------------------+------------------------
Changes (by oglekler):
* milestone: 6.3 => 6.4
Comment:
This is an enhancement, and we are in 12 days until Beta 1 after which we
will not add new enhancement to the release, so, because there is no
patch, I am moving this ticket to 6.4.
As far as I understand, the question now is if we need a new
`wp_get_attachment_image_path( $attachment_id, $size )` function or not,
please continue discussion and look for use cases. From my point of view
it is better to check that the file exists before using it for the
frontend otherwise you can end with broken images, and it isn't looks
nice. For example, new image size was added and used at some place but old
images didn't regenerate. So, checking if image exists, we can use
different size and avoid broken images to appear.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51780#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list