Creates a formatted <img /> element.

Parameters

  • string $path Path to the image file, relative to the app/webroot/img/ directory.
  • array $options Array of HTML attributes.

Returns

string
This method can be filtered.

Source

						public function image($path, array $options = array()) {
		$defaults = array('alt' => '');
		$options += $defaults;
		$path = is_array($path) ? $this->_context->url($path) : $path;
		$params = compact('path', 'options');
		$method = __METHOD__;

		return $this->_filter($method, $params, function($self, $params, $chain) use ($method) {
			return $self->invokeMethod('_render', array($method, 'image', $params));
		});
	}