How to set WordPress Featured thumbnail to fixed width and auto height

I want to change post featured thumbnail to 1300px width and auto height since I don’t want to crop the images, but nothing I do isn’t working. At first the code was like this

add_image_size('discussion_post_feature_image', 1300);

I saw some answers here and tried it like this but didn’t work

add_image_size('discussion_post_feature_image', 1300, 9999, false);

Is there any other way so I can upscale the image to that width but to not change the height? Thanks in advance.

Read more here: How to set WordPress Featured thumbnail to fixed width and auto height

Leave a Reply

Your email address will not be published. Required fields are marked *