Add Custom Image Sizes to Media Uploader

<?php
/**
* Add Custom Image Sizes to Media Uploader
* @author Pippin Williamson
* @link http://pippinsplugins.com/add-custom-image-sizes-to-media-uploader/
*
* @param array $sizes
* @return array
*/
function pw_show_image_sizes( $sizes ) {
$sizes['pw-thumb'] = __( 'Custom Thumb', 'pippin' );
$sizes['pw-large'] = __( 'Custom Large', 'pippin' );
return $sizes;
}
add_filter( 'image_size_names_choose', 'pw_show_image_sizes' );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk