Image sizes – functions

add image sizes inside after_theme_setup

Allow featured imagess:

<?php
add_theme_support( 'post-thumbnails' );

setting up additional image sizes (only use if required in the site otherwise creates server bloat)

<?php
add_image_size( 'gomo-hero', 1600, 800, true );
add_image_size( 'gomo-four-by-three', 800, 600, true );
add_image_size( 'gomo-square', 800, 800, true );

In the WordPress admin area under > settings > media, you may want to set medium and large image size to ‘0’ if you are using custom sizes in the functions file.

Search the site

Share this page:

Newsletter

Subscribe to get regular news and updates

  • This field is for validation purposes and should be left unchanged.