*** Ticksy security was compromised on August 17th. It is recommended you change your Ticksy password and update any WordPress and FTP credentials that you have posted on this website. There is no evidence any details were taken - this is just a precaution. ***

Okay
  Print

How can I edit and/or register new image sizes?

Huber uses WordPress's native image resize function add_image_size(). You can edit the theme's predefined image sizes by adding the following code to your child theme's functions.php file. You can change the image width, height and cropping options (including cropping position) for any of the image sizes. You will then need to run the Regenerate Thumbnails plugin after uploading these changes to recrop all your images to the new dimensions.

function ghostpool_image_sizes() {                
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'ghostpool-featured-image', 780, 500, false );
    add_image_size( 'ghostpool-page-header-image', 1400, 596, true );
    add_image_size( 'ghostpool-related-image', 576, 356, true );
    add_image_size( 'ghostpool-col-category-image', 576, 356, true );
    add_image_size( 'ghostpool-one-col-category-image', 780, 500, true );
    add_image_size( 'ghostpool-list-category-image', 250, 135, true );
    add_image_size( 'ghostpool-image-tab', 231, 231, true );
    add_image_size( 'ghostpool-posts-widget-image', 100, 80, true );
    add_image_size( 'ghostpool-featured-box-large-image', 979, 438, true );
    add_image_size( 'ghostpool-featured-box-small-image', 639, 200, true );
    add_image_size( 'ghostpool-menu-image', 206, 127, true );
    add_image_size( 'ghostpool-rating-box-image', 730, 310, true );                    
}

Additionally, the GP Blog Posts widget and Blog Visual Composer element have an option to choose from one of the predefined image sizes. If you want to add your own image sizes to the selection, instead of changing a predefined image, copy the following code to your child theme's functions.php file and add your new image sizes as shown below:

function ghostpool_image_sizes() {                
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'ghostpool-featured-image', 780, 500, false );
    add_image_size( 'ghostpool-page-header-image', 1400, 596, true );
    add_image_size( 'ghostpool-related-image', 576, 356, true );
    add_image_size( 'ghostpool-col-category-image', 576, 356, true );
    add_image_size( 'ghostpool-one-col-category-image', 780, 500, true );
    add_image_size( 'ghostpool-list-category-image', 250, 135, true );
    add_image_size( 'ghostpool-image-tab', 231, 231, true );
    add_image_size( 'ghostpool-posts-widget-image', 100, 80, true );
    add_image_size( 'ghostpool-featured-box-large-image', 979, 438, true );
    add_image_size( 'ghostpool-featured-box-small-image', 639, 200, true );
    add_image_size( 'ghostpool-menu-image', 206, 127, true );
    add_image_size( 'ghostpool-rating-box-image', 730, 310, true );  
    add_image_size( 'ghostpool-new-image-name-1', 100, 100, true ); // New image size
    add_image_size( 'ghostpool-new-image-name-2', 500, 900, false ); // New image size                     
}