fit my photos to featured image and also slider for Travelify theme

I tried to insert featured image for the post, but it got cut (when I look at home page) and it doesn’t show the full image (in featured slider as well). I’m using 16x10 photos and pictures on travelify demo are more narrow.
Is there any way I can use my photos? I can not cut all of them to the narrow version which I see on demo. Any help with this would be much appreciated. Thanks a lot.

Featured image and slider image size is defined via functions.php file that you can find in travelify theme folder or by going to WordPress dashboard >> Appearance >> Editor >> functions.php.

On that file you need to find these two lines:

add_image_size( 'featured', 670, 300, true );
add_image_size( 'slider', 1018, 460, true );

Use any image size you want. It makes no sense to change width as images will still be displayed in the same width but files themselves will be bigger in size. Instead change height (second number on each line) to get the aspect ration you are looking for. Increasing it to something like “9999” will no longer crop images but just resize them based on image width.

Since WordPress these changes won’t pick up instantly you will have to run plugin called Regenerate thumbnails. This should be done once and afterwards you can disable this plugin as newly uploaded images will have the right size.

Ok, I will edit the code then.
And this change won’t be overwritten after the theme update?

In the travelify demo, posts under Blog page are listed with smaller images. How do I create the same? I tried to go Pgaes->Blog->Page attributes-template->blog image medium but probably doing something wrong since this didn’t work.

Thanks a lot for all your help.


More information on how to use blog template please see theme documentation.

To make changes update safe you will have to use a child theme for that. A sample Travelify Child Theme can be downloaded from here.
Afterwards you can use this function via Child Theme functions.php

function travelify_child_theme_image_size() {
	add_image_size( 'featured', 670, 670, true );
	add_image_size( 'slider', 1018, 460, true );
add_action( 'after_setup_theme', 'travelify_child_theme_image_size', 11 );

Again image sizes are just an examples and you can use any size you want.