protected function image()
    {
        $locator = Grav::instance()['locator'];

        $file = $this->get('filepath');

        // Use existing cache folder or if it doesn't exist, create it.
        $cacheDir = $locator->findResource('cache://images', true) ?: $locator->findResource('cache://images', true, true);

        // Make sure we free previous image.
        unset($this->image);

        $this->image = ImageFile::open($file)
            ->setCacheDir($cacheDir)
            ->setActualCacheDir($cacheDir)
            ->setPrettyName($this->getImagePrettyName());

        return $this;
    }
protected function image()
    {
        $locator = Grav::instance()['locator'];

        $file = $this->get('filepath');

        // Use existing cache folder or if it doesn't exist, create it.
        $cacheDir = $locator->findResource('cache://images', true) ?: $locator->findResource('cache://images', true, true);

        // Make sure we free previous image.
        unset($this->image);

        $this->image = ImageFile::open($file)
            ->setCacheDir($cacheDir)
            ->setActualCacheDir($cacheDir)
            ->setPrettyName($this->getImagePrettyName());

        return $this;
    }
protected function image ( ) { $ locator = Grav :: instance ( ) [ 'locator' ] ; $ file = $ this -> get ( 'filepath' ) ; // Use existing cache folder or if it doesn't exist, create it. $ cacheDir = $ locator -> findResource ( 'cache://images' , true ) ? : $ locator -> findResource ( 'cache://images' , true , true ) ; // Make sure we free previous image. unset ( $ this -> image ) ; $ this -> image = ImageFile :: open ( $ file ) -> setCacheDir ( $ cacheDir ) -> setActualCacheDir ( $ cacheDir ) -> setPrettyName ( $ this -> getImagePrettyName ( ) ) ; return $ this ; }
Gets medium image, resets image manipulation operations.

@return $this
Gets medium image resets image manipulation operations .