1 post
  • Has been part of the Envato Community for over 2 years

Is there a way to scale up post thumbnails on Wordpress?

On a featured area I want a post thumbnail/featured image with 584×348 px. When I upload a smaller image as a featured image on a post, it won’t scale up to this size. If the image is 250×250, it will appear 250×250. But if I use a larger image as featured image on the post, it will resize normally.

The thumbnail in functions.php is set this way:

// This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size(150, 150); add_image_size( 'post-thumb', 584, 348, true );

The div:

<div class="featured_thumb"><?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'post-thumb' ); } ?></div>

And the class on style.css:

.featured_thumb {background:#0C6; width:584px; height:350px; overflow:hidden;}

Can someone help me to figure out how to do it? I thought of using timthumb but I’ve seen lots of complains about security. Not quite sure about it…

I’ve tried looking for help in Wordpress support forum but no one actually aswered me. And please tell me if I’m in the wrong place.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes