Tag Info

New answers tagged

2

In your handler, if you set 'error', the error message will be displayed and will cancel the upload add_filter('wp_handle_upload_prefilter', 'custom_upload_filter' ); function custom_upload_filter( $file ){ $image_info = getimagesize($file['tmp_name']); $image_width = $image_info[0]; $image_height = $image_info[1]; if($image_with != 800 ...


0

Add your own custom sizes or modify the values for the existing sizes. You can use this code which includes a parameter to hard crop your images in different positions: add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) ); // Hard crop left top



Top 50 recent answers are included