Custom Image Size Function
-
I’m trying to create a button or option on the upload screen that only doesn’t resize the image, so that I can pick and choose if I want different sizes for an image. I know the code below will unset the sizes all the time if put in functions.php . Is there a way to only implement it when a checkbox or some similar option is clicked?
function custom_filter_image_sizes($sizes) { unset( $sizes['thumbnail']); unset( $sizes['medium']); unset( $sizes['large']); return $sizes; } add_filter('intermediate_image_sizes_advanced', 'custom_filter_image_sizes');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Image Size Function’ is closed to new replies.