By MantaRay

2019-01-08 17:52:40 8 Comments

The theme has set thumbnail sizes for featured images:

    add_theme_support( 'post-thumbnails' );
add_image_size( 'hitmag-landscape', 1120, 450, true );
add_image_size( 'hitmag-featured', 735, 400, true );
add_image_size( 'hitmag-grid', 348, 215, true );
add_image_size( 'hitmag-list', 290, 220, true );
add_image_size( 'hitmag-thumbnail', 135, 93, true );

How do I set the "featured" image one so that the image size is just whatever image I upload (for height - I want to be able to set width to 735 still)


@RiddleMeThis 2019-01-08 18:10:13

Featured image sizes are mostly likely controlled by your theme, so I would look there. Maybe there is a theme setting for it.

You can also check the following setting to see if it us using one of those sizes.

enter image description here

You can change the featured image size by adding this code into your functions.php file. More info on set_post_thumbnail_size.

set_post_thumbnail_size( 500, 500 );

You can also add a new image size and then use it in your template by doing something like this...

add_image_size( 'featured-image-size', 800, 9999 ); // Add to functions.php
php the_post_thumbnail( 'featured-image-size' ); // Template usage

More info on add_image_size & the_post_thumbnail

Edit: Since you updated your question, here is an updated answer.

You can set the height to be unlimited like this...

add_image_size( 'hitmag-featured', 735, 9999 ); 

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Are WP images responsive by default?

  • 2016-11-30 04:24:34
  • Yoona
  • 83 View
  • 0 Score
  • 2 Answer
  • Tags:   images css

2 Answered Questions

[SOLVED] WP 4.4. responsive images browser choosing the "wrong" one

1 Answered Questions

How do I set a specific size for my image?

1 Answered Questions

[SOLVED] Orientation of featured image in post?

5 Answered Questions

[SOLVED] Generate Thumbnails only for Featured Images

1 Answered Questions

[SOLVED] How do I get resized thumbnails?

1 Answered Questions

[SOLVED] Exact image sizes

1 Answered Questions

[SOLVED] How to crop images in a certain size only for a certain page?

  • 2013-09-26 09:01:52
  • Mayeenul Islam
  • 1030 View
  • 0 Score
  • 1 Answer
  • Tags:   images image-resize

1 Answered Questions

[SOLVED] Multiple featured sizes / images / excerpts

1 Answered Questions

[SOLVED] Media > Image Sizes aren't being applied to uploads

Sponsored Content