I used this code, but nothing happen, maybe there is something small detail missing thankyou who ever may help
$mimes = array( 'image/jpeg');
if( !in_array( $file['type'], $mimes ) )
return $file;
$image = getimagesize($file['tmp_name']);
$minimum = array(
'width' => '400',
'height' => '400'
);
$maximum = array(
'width' => '400',
'height' => '400'
);
$image_width = $image[0];
$image_height = $image[1];
if ( $image_width < $minimum['width'] || $image_height < $minimum['height'] ) {
$adOK = 0; $post_new_error['job_img'] = __('Image dimension too small');
}
elseif ( $image_width > $maximum['width'] || $image_height > $maximum['height'] ) {
$adOK = 0; $post_new_error['job_img'] = __('Image dimension too big');
}