yii2images issue

I installed from composer php 7.1

Everything looks ok, images names and paths stored in database, but when i am trying to show in DetailView

<?php $img = $model->getImage(); ?>

<?= DetailView::widget([

‘model’ => model,

‘attributes’ => [




[‘attribute’ => ‘image’,

‘value’ => “<img src=’{$img->getUrl()}’>”,


]) ?>

It giving me wrong path:

<img src=’/6/images/image-by-item-and-alias?item=Product6&dirtyAlias=b8895666dc-1.png’>

But it should be:

yii2images instead of 6 - at start of url


How the image path is saved?

if i write:

‘value’ => “<img src=’/yii2images/images/image-by-item-and-alias item=Product6&dirtyAlias=b8895666dc-1.png’>”,

image is ok



Yes, but what is the path saved in DB? Is it "6/…" or "yii2images/…"? In order to sort out the issue, you have to understand where the issue happens - on data save or on data load.