public function is_image(string $blank = null, string $params, array $data): bool
	{
		// Grab the file name off the top of the $params
		// after we split it.
		$params = explode(',', $params);
		$name   = array_shift($params);

		$file = $this->request->getFile($name);

		if (is_null($file))
		{
			return false;
		}

		// We know that our mimes list always has the first mime
		// start with `image` even when then are multiple accepted types.
		$type = \Config\Mimes::guessTypeFromExtension($file->getExtension());

		return mb_strpos($type, 'image') === 0;
	}
public function is_image(string $blank = null, string $params, array $data): bool
	{
		// Grab the file name off the top of the $params
		// after we split it.
		$params = explode(',', $params);
		$name   = array_shift($params);

		$file = $this->request->getFile($name);

		if (is_null($file))
		{
			return false;
		}

		// We know that our mimes list always has the first mime
		// start with `image` even when then are multiple accepted types.
		$type = \Config\Mimes::guessTypeFromExtension($file->getExtension());

		return mb_strpos($type, 'image') === 0;
	}
public function is_image ( string $ blank = null , string $ params , array $ data ) : bool { // Grab the file name off the top of the $params // after we split it. $ params = explode ( ',' , $ params ) ; $ name = array_shift ( $ params ) ; $ file = $ this -> request -> getFile ( $ name ) ; if ( is_null ( $ file ) ) { return false ; } // We know that our mimes list always has the first mime // start with `image` even when then are multiple accepted types. $ type = \ Config \ Mimes :: guessTypeFromExtension ( $ file -> getExtension ( ) ) ; return mb_strpos ( $ type , 'image' ) === 0 ; }
Uses the mime config file to determine if a file is considered an "image",
which for our purposes basically means that it's a raster image or svg.

@param string|null $blank
@param string      $params
@param array       $data

@return boolean
Uses the mime config file to determine if a file is considered an image which for our purposes basically means that it s a raster image or svg .