Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Display new image sizes choices set through add_image_size() also in the backend in the right sidebar when editing an image
function wh_add_image_sizes_to_backend( $existingsizes ) {
$addsizes = array(
"wh-homepage-teaser" => 'WH Homepage Teaser',
"wh-landingpage-stage" => 'WH Landingpage Stage',
"wh-detailpage-feature" => 'WH Detailpage Feature'
$newsizes = array_merge( $existingsizes, $addsizes );
return $newsizes;
add_filter( 'image_size_names_choose', 'wh_add_image_sizes_to_backend' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment