protected function is_valid_image_file($file_path) {
        if (!preg_match($this->options['image_file_types'], $file_path)) {
            return false;
        }
        if (function_exists('exif_imagetype')) {
            $contents = file_get_contents($file_path);
            // create data:// wrapper is the only way to apply exif_imagetype() to string
            $data = 'data://image/jpeg;base64,' . base64_encode($contents);
            $image_type = exif_imagetype($data);
            $this->exif_image_objects[$file_path] = array(
                'type' => $image_type,
                'data' => @exif_read_data($data),
            );
            unset($contents);
            return $image_type;
        }
        $image_info = $this->get_image_size($file_path);
        return $image_info && $image_info[0] && $image_info[1];
    }
protected function is_valid_image_file($file_path) {
        if (!preg_match($this->options['image_file_types'], $file_path)) {
            return false;
        }
        if (function_exists('exif_imagetype')) {
            $contents = file_get_contents($file_path);
            // create data:// wrapper is the only way to apply exif_imagetype() to string
            $data = 'data://image/jpeg;base64,' . base64_encode($contents);
            $image_type = exif_imagetype($data);
            $this->exif_image_objects[$file_path] = array(
                'type' => $image_type,
                'data' => @exif_read_data($data),
            );
            unset($contents);
            return $image_type;
        }
        $image_info = $this->get_image_size($file_path);
        return $image_info && $image_info[0] && $image_info[1];
    }
protected function is_valid_image_file ( $ file_path ) { if ( ! preg_match ( $ this -> options [ 'image_file_types' ] , $ file_path ) ) { return false ; } if ( function_exists ( 'exif_imagetype' ) ) { $ contents = file_get_contents ( $ file_path ) ; // create data:// wrapper is the only way to apply exif_imagetype() to string $ data = 'data://image/jpeg;base64,' . base64_encode ( $ contents ) ; $ image_type = exif_imagetype ( $ data ) ; $ this -> exif_image_objects [ $ file_path ] = array ( 'type' => $ image_type , 'data' => @ exif_read_data ( $ data ) , ) ; unset ( $ contents ) ; return $ image_type ; } $ image_info = $ this -> get_image_size ( $ file_path ) ; return $ image_info && $ image_info [ 0 ] && $ image_info [ 1 ] ; }
Overridden to cache image exif data
@inheritdoc
Overridden to cache image exif data