Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When WP creates thumbnails from the original uploaded image, they are hidden from view inside the Media Manager listing. Can they be made visible, via some filter or action so that you can selectively edit/delete them?

share|improve this question
    
Please explain more, are you saying when an image is uploaded as a thumbnail, ie. directly when creating a post and setting the featured image, that, this image is hidden from the media listing? If that's not the case, i'm not sure i follow, surely displaying thumbnails otherwise would result in duplicate media items, no? –  t31os Jan 26 '11 at 14:33
    
@t31os - I would like to see every image that appears in the directory, even ones that appear to be duplicated. If WP created an image, I want to see it, just like I see in FTP. Make sense? –  Scott B Mar 12 '11 at 20:07
add comment

2 Answers 2

Notice:

I'm considering that by Media Manager you're referring to the Media Library.

/wp-admin/media.php

Maybe pre_get_posts could handle this, but won't get there...

I'd propose an alternative solution that prevents seeing lots of duplicates in the Media Library page:

enter image description here

The output of the All Thumbs column is simply a link to the image.
But I think it can be easily adapted to include at least a delete capability, using some PHP script.

It could also be coupled with jQuery behavior control and CSS styling...

if( is_admin() )
{
    add_filter( 'manage_upload_columns', 'wpse_7757_all_thumbs_column_register' );
    add_action( 'manage_media_custom_column', 'wpse_7757_all_thumbs_columns_display', 10, 2 );
}

function wpse_7757_all_thumbs_column_register( $columns ) 
{
    $columns['all_thumbs'] = 'All Thumbs';

    return $columns;
}

function wpse_7757_all_thumbs_columns_display( $column_name, $post_id ) 
{
    if( 'all_thumbs' != $column_name || !wp_attachment_is_image($post_id) )
        return;

    $full_size = wp_get_attachment_image_src( $post_id, 'full' );
    echo '<div style="clear:both">FULL SIZE : '.$full_size[1].' x '.$full_size[2].'</div>';

    $size_names = get_intermediate_image_sizes();

    foreach( $size_names as $name )
    {
        // CHECK THIS: http://wordpress.org/support/topic/wp_get_attachment_image_src-problem
        $the_list = wp_get_attachment_image_src( $post_id, $name );

        if ( $the_list[3] )
            echo '<div style="clear:both"><a href="'.$the_list[0].'" target="_blank">'.$name.'</a> : '.$the_list[1].' x '.$the_list[2].'</div>';
    }
}
share|improve this answer
add comment

Why not just go to Dashboard -> Media -> Library? From there, you can see every image in the Media Library, and can perform some bulk operations, etc.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.