B
B
Bersonazh2019-02-24 13:24:38
Yii
Bersonazh, 2019-02-24 13:24:38

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. 5c72731274b48237296445.png
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

1 answer(s)
K
Kirill Arutyunov, 2019-02-24
@Bersonazh

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 question

Ask a Question

731 491 924 answers to any question