WP Custom Imagem Size available on Media Size selector

<?php function custom_image_size( $id, $name, $width, $height, $crop = false ){ add_image_size( $id, $width, $height, $crop ); add_filter( 'image_size_names_choose', function( $sizes ){ $newsizes[ $id ] = __( $name ); return $newsizes; } }
Add WP custom image size and show this new size on Media Insert size selector.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.