Answer the question
In order to leave comments, you need to log in
How to display image in yii2?
I'm trying to display a picture from the database in a view, the path to the folder with the picture is backend/web/images. Here is the code in the view:
It seems that the path is displayed in the browser,
but for some reason the link is broken. I tried to put a slash in front. Please tell me what is wrong here? '/web/' .$model->image)
= Html::img(@backend.<img src="backend/web/images/13363.jpg" alt="">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question