Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

yingkhun on "help me about thumbnail"

$
0
0

index.php

$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
<div class="preview"><a><?php echo "$thumbID"; ?></a></div>

function.php

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 305, 9999 );
add_image_size( 'background', 305, 9999 );

i need to use original image(url) and resize to 305,xxx
but this code make thumbnail size and low quality.

ex.
original url :
http://www.test.com/img.jpg

this code make :
http://www.test.com/img-305x252.jpg

i want to use original url and resize to 305x252 (it's make high img quality)
how to edit this code

ps.sorry about bad in english and thanks


Viewing all articles
Browse latest Browse all 8245

Trending Articles