Custom Image Sizes in the Media insertion tool

I had a variety of custom image sizes that I defined by using the plugin “Simple Image Sizes.” When I used Beaver Builder to rebuild the site I’m currently working on, I found that I could no longer select from those custom sizes when using the Media tool. I deactivated that plugin and just did it in code by adding this to functions.php:

// Add our custom image sizes
add_image_size( 'slider', '1148', '400', array( "1", "") ); 
add_image_size( 'department-slider', '810', '360', false ); 
add_image_size( 'featured-image', '350', '200', false ); 

// Add custom image sizes to Media insertion dropdown menu
add_filter('image_size_names_choose', 'xmit_image_sizes');

function xmit_image_sizes($sizes) {
	$addsizes = array(
		"featured-image" => __( "Featured Image"),
		"department-slider" => __( "Department Slider"),
		"slider" => __( "Slider")
	);
	$newsizes = array_merge($sizes, $addsizes);
	return $newsizes;
}

Not to say that the problem is with Beaver Builder; it could just as easily be a problem with Simple Image Sizes. Since that plugin is pretty popular and I probably won’t be the one to have this problem, I thought I’d share the solution.

Hey Dave,

Thanks for getting in touch! I’ll run that plugin through the guys and see what they say. We also have another thread discussing how to add custom sizes. Check the link below.
http://forum.wpbeaverbuilder.com/support/q/custom-image-sizes-are-working-beutifully/

Ben

Okay, thanks. I did search the forum for an answer to this but didn’t find that thread. Thanks for the link!

Hey Dave,

No worries! Enjoy BB! :slight_smile:

Ben

I just tried using this plugin and it removed all of the image size option in beaver builder apart from “full size”. I deactivated the plugin but the image sizes haven’t re-appeared.

I am running a multi-site so users don’t have access to theme to add their own sizes, I need some dynamic method for users to accomplish this.

Was there any solution found that got the plugin to work? Is there anyway to get original image sizes back?

Hey Mike,

Can you check under Settings > Media and see if the rest of the sizes are still there? Can you try clearing the BB cache along with any other caching that you might have? Can you also try running the plugin Regenerate Thumbnails and see if that helps?

You can just let your users adjust the dimensions of the sizes that WP offers under Settings > Media. If that’s not an option, feel free to look for other plugins that allows you to add custom image sizes. Sorry but I haven’t really tried one.

Ben