[wp-trac] [WordPress Trac] #23292: Media uploader loads full size image and slows down, please change to thumbnails.
WordPress Trac
noreply at wordpress.org
Sun Jul 14 20:24:15 UTC 2013
#23292: Media uploader loads full size image and slows down, please change to
thumbnails.
--------------------------+------------------------------
Reporter: mnrtjeR | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by DrewAPicture):
* keywords: needs-testing => has-patch
Comment:
Rather than switching from one size to another (which doesn't provide any
more flexibility than we already have), [attachment:23292.diff] adds a
filter to `$attachment_url`. More flexibility for different use cases.
For example, with the filter, something like this could be used:
{{{
function filter_prepared_attachment_size( $url, $attachment ) {
return wp_get_attachment_thumb_url( $attachment->ID );
}
add_filter( 'wp_prepare_attachment_url',
'filter_prepared_attachment_size', 10, 2 );
}}}
Replying to [comment:5 MDesigner0]:
> I hate to say it, but that patch does not work. Nor does the original
ticket submitter's fix. Of course, I'm in 3.5.1, does that make a
difference? That line of code is on 1333 for me, not 1604.
Patches here are against latest trunk which is 3.6 RC1.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23292#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list