yii2-images icon indicating copy to clipboard operation
yii2-images copied to clipboard

error 404

Open sinergycode opened this issue 6 years ago • 4 comments

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?

sinergycode avatar Mar 13 '18 15:03 sinergycode

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

sinergycode avatar Mar 14 '18 09:03 sinergycode

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 )

N1kolayS avatar Mar 17 '18 06:03 N1kolayS

Ok, thanks for information.

sinergycode avatar Mar 17 '18 09:03 sinergycode

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.

synatree avatar Jan 09 '19 03:01 synatree