简体   繁体   中英

Wordpress post thumbnails

Is there a way to stop wordpress resizing images?

I already have in the functions.php

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 235, 419 );
add_image_size( 'single-post-thumbnail', 235, 419 );

Still doesn't work, when I upload a post thumbnail resizes it to some crazy sizes which I don't want..Any way to get this working?

//The resized image is 235x198 it should be 235x419that's the size of the image that I'm uploading

//SOLVED with the_post_thumbnail("large");

That's because it's scaling the image! Pass a third argument as true so that images are cropped to the exact size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM