
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));
use yii\helpers\Url;The way to use:
Html::img(Url::to('@web/images/logo.png', true));
You must be logged in to post a comment.