Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Thumbnails with custom size

$
0
0

Replies: 0

I’m trying to use thumbnails with custom size.

I placed add_theme_support( ‘post-thumbnails’ ) in functions.php to start the wordpress thumbnail suport for the theme.

After I placed some custom sizes:

add_image_size( ‘post-single-img-size’, 785, 350, true );
add_image_size( ‘post-1-large-img-size’, 592, 350, true );
add_image_size( ‘post-1-small-img-size’, 296, 175, true );

When I call the_post_thumbnail(‘post-1-large-img-size’); in the index.php, I see the image with disproportionate size.

Whit the HTML code like this

<img width="1920" height="1080" src="https://mydomain.com/wp-content/uploads/2017/04/XO_010.bmp.jpg" alt="" />

The src points to the original image.


Viewing all articles
Browse latest Browse all 67836

Trending Articles