Have custom image size appear in Image Block “Resolution” options

[ad_1]

I’ve registered a new image size with `add_image_size` and added a label via `image_size_names_choose` but my image size option does not appear for images placed using the Image Block. What else do I need to do?

Here is where the image option should appear. I only see the WordPress defaults of “Thumbnail,” “Medium,” and “Full.”

https://preview.redd.it/4h818s1z5tqc1.jpg?width=347&format=pjpg&auto=webp&s=c96bb51853242ee1e877cfffa7ded568a57150ab

add_image_size(‘image-card’, 500, 500, TRUE);
add_filter(‘image_size_names_choose’, ‘custom_sizes’);
function custom_sizes($sizes) {
return array_merge($sizes, [
‘image-card’ => __(‘Image Card’, ‘custom’),
]);
}

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer