How to call media uploader with custom settings for a custom post type. Currently below code is applying changes for all post types

add_filter(‘wp_handle_upload_prefilter’,’sangp_handle_upload_prefilter’); function sangp_handle_upload_prefilter($file){ $img=getimagesize($file[‘tmp_name’]); $minimum = array(‘width’ => ‘1920’, ‘height’ => ‘802’); $width= $img[0]; $height =$img[1]; if ($width < $minimum[‘width’]…