The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Issues with distorted 'featured image' (2 posts)

  1. vikkineal
    Posted 4 years ago #


    I'm using the following code to set the size of the 'featured image'

    //add support for thumbnails
    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 150, 150);
    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'category-thumb', 260, 90, true); //300 pixels wide (and unlimited height)

    However, when uploading an image at 520x180 or even the right dimensions are appearing distorted/pixelated.

    Looking at the image itself, it's being set as 150x150 and obviously stretching to fill the dimensions above.

    However, when displaying in the post it is showing even smaller than the sizes above.

    Any ideas?


  2. vikkineal
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic