Add custom image size in child theme
-
Hello,
I’m trying to re-add my custom thumbnails size in my functions.php (in child theme) but my usual code stopped worked (not displayed in media uploader like before) since the update (with regen. thumb and new uploaded img):
function alx_setup() {
// Enable featured imageadd_theme_support( ‘post-thumbnails’ );
// Thumbnail sizes
if ( function_exists( ‘add_image_size’ ) ) {
add_image_size( ‘mininews’, 90, 90, true );
add_image_size( ‘thumb-small’, 160, 160, true );
add_image_size( ‘thumb-medium’, 520, 245, true );
add_image_size( ‘thumb-large’, 1000, 472, true );
}add_filter(‘image_size_names_choose’, ‘my_custom_sizes’);
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
‘mininews’ => __(‘Mini-news’),
) );
}What i need to do ?
Thanks
- The topic ‘Add custom image size in child theme’ is closed to new replies.