Archived topic
add image size
6 replies · Started by webtags on May 29, 2017
Hi,
i'm trying to add a custom image size to functions.php.
the code i'm inserting is:
add_action( 'after_setup_theme', 'wpdocs_theme_setup' );
function wpdocs_theme_setup() {
add_image_size( 'slider-thumb', 700, 400, true );
}
But i cant see the new image size to choose from.
What's wrong?
Hi there,
The code looks good to me. Can you try adding it using Code Snippets if you are not using a child theme?
https://docs.generatepress.com/article/adding-php/#code-snippets
Let us know.
You might need to regenerate your thumbnails: https://en-ca.wordpress.org/plugins/regenerate-thumbnails/
Hi Leo,
i'm using a child theme.
I have created a new widget area inside the index page.
I'm using a slider to show multiple posts.
The slider i'm using is WP Posts Carousel.
Inside the options i can choose the size of the featured image.
But i dont see the slider-thumb...
Just making sure you didn't miss Tom's reply above: https://generatepress.com/forums/topic/add-image-size/#post-325713
Hi, I solved the problem in one way or another...
Probably a bug of the plugin.
Thank you for your support
Glad we could help!