Support » Fixing WordPress » Post Thumbnail loosing Quality..Please help

  • Hey everyone, im having a problem figuring this out. I am displaying a random post on the header of my site but the post-thumbnail looses quality when I add a custom size. How can i make it not loose quality?

    This is the code in header.php

    $args = array( 'numberposts' => 1, 'orderby' => 'rand', 'post_status' => 'publish', 'offset' => 1);
    $rand_posts = get_posts( $args );
    foreach( $rand_posts as $post ) : ?>
    <div class="post-thumb-title"><?php the_post_thumbnail(array(730,250)); ?>
    <p class="thumb-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
    <?php endforeach; ?></div>

    And this is the css {
     width: 730px;
     margin: 1em auto;
    } img {
     display: block;
     min-width: 100%;
    } p.thumb-title {
     margin: 0;
     height: 2em;
     line-height: 2;
     position: relative;
     top: -2em;
     max-width: 100%;
     text-align: center;
     color: #fff;
     background: rgba(0, 0, 0, 0.7);

    Image quality is horrible. Am i doing something wrong or is there a fix for this? Thanks for your help

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Post Thumbnail loosing Quality..Please help’ is closed to new replies.