1

How can I add image size for header_image() just like featured image by using add_image_size()

What is the correct way of adding image size for header_image()

1 Answer 1

1

This may can help you

add_theme_support( 'post-thumbnails', array( 'post' ,'promotions', 
    'services', 'counter') );
set_post_thumbnail_size( 200, 200, true );
add_image_size( 'slider-image', true );

Image will resize according to your html code

2
  • I cannot understand Commented Mar 9, 2017 at 10:22
  • this is for theme support, array is defined for post type and in add_image_size slider_image is for id Commented Mar 9, 2017 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.