Answer the question
In order to leave comments, you need to log in
Yii2 advanced how to correctly insert images?
I prescribe the path to the pictures, the path is displayed in the browser, but the browser does not see them. I believe that this is due to the htaccess settings, tk. when you go to the picture, the /web folder remains the root + the rest of the path specified in the picture is already added here. The pictures are in the frontend/images folder.
Here is the path that the browser sees when I click on the image in the console: web/images/screen.png
Answer the question
In order to leave comments, you need to log in
The browser cannot access anything above the web folder level. To do this, you can register a symbolic link ln -s frontend/web/images frontend/images
, or move the images folder to the web folder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question