Thumbnails with custom size
-
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 uploaded an image and 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.
- The topic ‘Thumbnails with custom size’ is closed to new replies.