Change Image Sizes in Child Themes


Click Here To Learn More About Child Themes Click Here To View The WordPress Codex Docs

Locate Current Image Sizes

Before you can modify your image sizes in your child theme, you must first locate them in the files so you know the exact image slug to target. The

functions are located in two places.


To easily locate this, just do a text search in the file for

Once you’ve found the image size function, you can copy out the image size slug that you’re wanting to modify, for use in your child theme’s function.

Note: The “portfolio-five” image size is used for not only the five column portfolio layout, but is also used in the Recent Posts element’s “Thumbnail on Side” layout.

Modify Your Child Theme

Now that you have the slug for the image size you would like to change, it’s time to move to your child theme.

Step 1 – Go into your child theme folder and open the functions.php file. If you don’t have this file, simply create one with the same filename.

Step 2 – At the very bottom, add this action:

Step 3 – Replace the value ‘blog-large’ inside remove_image_size( 'blog-large' ); with the image slug of your desired image size.

Step 4 – In add_image_size( 'blog-large', width, height, true );, replace the values with the exact same image slug and add your desired width and height values respectively. For example, 'blog-large', 1000, 500

Step 5 – If you’d like to change more than one image size, copy these actions and paste them inside the same my_child_theme_image_size() function and change the necessary values accordingly:

1 Like
Proudly Serving Over 400000 Satisfied Users!