hardcrop images in gutenberg “latest posts” block


I like the gutenberg “latest posts” block. The problem I have with it is that it doesn’t hardcrop images that users upload to the posts. Is there a way to choose a hard-cropped or custom size that I have created through the add_image_size() function?

I don’t really have any code, but I think this question is on topic because it’s purely about wordpress core. I’m sorry if it isn’t!

What I have used to create my custom image size is this though:

add_action( 'after_setup_theme', 'aeroleds_image_sizes' );
function aeroleds_image_sizes() {
    add_image_size( 'banner-image', 400, 300, true ); // (cropped)
pressword 4 months 0 Answers 13 views 0

Leave an answer