• I’m building a site while the site owner has been learning how to manage the site.

    I just looked at the site media library and it is full solid with loads of crap. Duplicate entries and loads of media that appear attached to things that are not.

    I’m guesssing that if you have a post and add an image to it you get an entry in the library. And if you work on an trial and error basis you are going to end up with repeat entries.

    Is that how it works?

    Is there a way to tidy things up?

    Thanks

    Martin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Martin,
    There are several images created by WordPress, if you use the feature image and the size is set to crop then you will have the original and the featured image.

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 600, 400, true );

    Called:

    <?php echo get_the_post_thumbnail($post->ID ); ?>

    In the themes functions.php there could be theme dependent custom sizes as well.

    add_image_size( 'list-thumb', 360, 240, true );

    called:

    <?php echo get_the_post_thumbnail($post->ID, 'list-thumb'); ?>

    Then you have the three default thumbnail sizes set from Admin > Settings > Media

    These images can be used by the theme, feeds or plugins, these images are what we used in your other post for the ribbon.

    In the Admin > Settings > Media there are three ‘thumbnail’, ‘medium’ and ‘large’, so we called the smallest of these to load quicker.

    <?php echo get_the_post_thumbnail($post->ID, array(50,50) , 'thumbnail'); ?>

    HTH

    David

    Thread Starter martcol

    (@hotmale)

    Thanks again David,

    Martin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Understanding the Medial Library’ is closed to new replies.