# How to alter image size in posts

**URL:** <https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816>\
**Category:** Travelify\
**Created:** [August 4, 2015, 10:25am UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816 "2015-08-04T10:25:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultrawidelife](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/u/278dde/32.png) [@ultrawidelife](https://colorlibsupport.com/u/ultrawidelife)\
**Post date:** [August 4, 2015, 10:25am UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816/1 "2015-08-04T10:25:20Z")

</div>

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](http://ultrawidelife.com)

---

<div class="post-metadata">

**Author:** ![ultrawidelife](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/u/278dde/32.png) [@ultrawidelife](https://colorlibsupport.com/u/ultrawidelife)\
**Post date:** [August 6, 2015, 3:24am UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816/2 "2015-08-06T03:24:15Z")

</div>

anybody?

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [September 1, 2015, 1:28pm UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816/3 "2015-09-01T13:28:59Z")

</div>

Hi @ultrawidelife,

Thank you for your patience here.

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

```auto
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.

> **[Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)**
>
> Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your theme.

Best Regards,  
Movin

---

<div class="post-metadata">

**Author:** ![ultrawidelife](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/u/278dde/32.png) [@ultrawidelife](https://colorlibsupport.com/u/ultrawidelife)\
**Post date:** [October 16, 2015, 5:01am UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816/4 "2015-10-16T05:01:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [October 18, 2015, 6:18am UTC](https://colorlibsupport.com/t/how-to-alter-image-size-in-posts/7816/5 "2015-10-18T06:18:53Z")

</div>

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](https://codex.wordpress.org/Content_Width)

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](https://codex.wordpress.org/Child_Themes) as i have done in the attached child theme of Travelify theme.

Best Regards,  
Movin
