src/Helpers/Request/HtmlHelper.php
public function img($src, $options = [], $encoding = null)
    {
        $arguments = [$src, $options, $encoding];
        $this->injectVariableToArguments($this->app->charset, $arguments, -1);
        $arguments[] = $this->app;
        return $this->proxy(__FUNCTION__, $arguments);
    }
public function img($src, $options = [], $encoding = null)
    {
        $arguments = [$src, $options, $encoding];
        $this->injectVariableToArguments($this->app->charset, $arguments, -1);
        $arguments[] = $this->app;
        return $this->proxy(__FUNCTION__, $arguments);
    }
Generates an image tag.
@param array|string $src the image URL. This parameter will be processed by [[Url::to()]].
@param array        $options the tag options in terms of name-value pairs. These will be rendered as
the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
If a value is null, the corresponding attribute will not be rendered.
See [[renderTagAttributes()]] for details on how attributes are being rendered.

It is possible to pass the `srcset` option as an array which keys are
descriptors and values are URLs. All URLs will be processed by [[Url::to()]].
@param string       $encoding
@return string the generated image tag.
@see Html::img()