July 27 2016

Yii2 an absolute url image src

Tagged Under :

Yii
If you want to set full url or absolute url on Yii2 Html img, you may need to use “Url” helper this class on your page.

use yii\helpers\Url;
The way to use:
Html::img(Url::to('@web/images/logo.png', true));

Make a Comment

*

code