How to alter image size in posts

Hey,
First of all thanks for creating a wonderful theme.

I want to change the size of images displayed in posts. Right now only 700px size is set to default (I think?)
So even if i upload a image with size 900px, it will be shows as 700px only.

I want it to be displayed as native size. So i can control the size of images on each post.

my blog: ultrawidelife.com

anybody?

Hi @ultrawidelife,

Thank you for your patience here.

You can achieve this using the attached small plugin that contains the following code.

add_action( 'after_setup_theme', 'custom_travelify_setup', 99 );

function custom_travelify_setup() {

	// Add Travelify custom image sizes
	add_image_size( 'featured', 1070, 500, true );
	add_image_size( 'featured-medium', 460, 460, true );

}

Change the image size in the above plugin code to whatever you want to use.

The already used images are not resized automatically to the new sizes, you have to use the following plugin to regenerate the images with new sizes.

Best Regards,
Movin

Thanks for your response @movin

I updated

functions.php ->

if ( ! isset( $content_width ) )
$content_width = 900;

I am happy with all images with width of 900px on my site.

Do you any problem with this approach?

Hi @ultrawidelife

Content Width is a theme feature. Using this feature you can set the maximum allowed width for any content in the theme, like oEmbeds and images added to posts. Find more information about here Content Width « WordPress Codex

So you can change this content width to display images having larger width but if you make changes in the Travelify theme file then you have to make these changes again after theme updation as changes made in the theme files get lost on theme updation so to overcome this issue you can change the content width in the child theme as i have done in the attached child theme of Travelify theme.

Best Regards,
Movin