yii2-images
yii2-images copied to clipboard
error 404
Hi, i made all like in the documentation, and the image is saving, but in the view i get 404 error. Can you help me?
Detalis: The installation was successful. The code was set up the same as in the documentation. All is well, the picture is saved on the server but in the view it is not displayed:
[
'attribute' => 'image',
'value' => "<img src = '{$img->getUrl()}'>",
]
Result:
img src = '/19/images/image-by-item-and-alias?item=News1&dirtyAlias=b955bdfb6b-1.jpg' If i put:
[
'attribute' => 'image',
'value' => "<img src = '{$img->getUrl()}'>",
'format' => 'html',
],
then do not show up - error 404
Hi! I have a same problem. After update my old project. (upgraded Yii Framework from version 2.0.12 to 2.0.14.2.) . getImage() must return same path "yii2images/images/image-by-item-and-alias?item=" instead "/19/images/image-by-item-and-alias?item="
Sorry for my English )
Ok, thanks for information.
Yes, it seems you have to use the module id, then /images... so yii2images/images/...
It didn't used to be this way, I'm not sure why this is happening now. I will post if I find a workaround.