Understanding the Medial Library (3 posts)

  1. martcol
    Posted 4 years ago #

    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?



  2. Digital Raindrops
    Posted 4 years ago #

    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 );


    <?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 );


    <?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'); ?>



  3. martcol
    Posted 4 years ago #

    Thanks again David,


Topic Closed

This topic has been closed to new replies.

About this Topic