[wp-trac] [WordPress Trac] #20205: Add the ability to filter wp_get_attachment_image()
WordPress Trac
noreply at wordpress.org
Tue Feb 19 18:38:39 UTC 2013
#20205: Add the ability to filter wp_get_attachment_image()
------------------------------------+------------------
Reporter: helgatheviking | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.6
Component: Media | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Comment (by jfarthing84):
>The problem with that is that people will break stuff faster.
Sorry, but if people "break" something, that's their own problem. There is
no warranty, expressed or implied, when you utilize the available hooks
that WordPress provides.
>I was thinking if we can make if safer and easier. They can pass the url
and then call getimagesize() on it so you can retrieve the width/height.
The problem with this approach, is that some servers do not allow calling
getimagesize on a remote image. What if somebody wants to use a remote
image, such as a YouTube thumb, and they already know the dimensions. They
can then pass the known dimensions into the filter.
>I also not sure if we should apply the filter on the result of
image_downsize().
I would expect the filter to be applied to whatever result the function
produces.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20205#comment:32>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list