You are here

function imagecache_profiles_file_validate in ImageCache Profiles 7

Implements hook_file_validate().

File

./imagecache_profiles.module, line 128

Code

function imagecache_profiles_file_validate($file) {
  if (!empty($file->source) && $file->source == 'picture_upload') {
    $width = variable_get('user_picture_imagecache_profiles_min_width', 0);
    $height = variable_get('user_picture_imagecache_profiles_min_height', 0);
    $minimum_dimensions = $width . 'x' . $height;
    return file_validate_image_resolution($file, 0, $minimum_dimensions);
  }
}