how to resolve images paths in yii

I have a yii application which uses Basic template

I have placed my application folder in /var/www/basic folder

and my web folder in /var/www/html/web

I am facing problem in how to resolve the image paths

where do I need place my images folder

when I place them in web folder I am unable to resolve the @web Aliases

how to use images in application so that url need not to be hard coded.

I have read this links but is am still unable to resolve image paths

Can Some suggest a solution.

What is the best way of storing and displaying upload content of users in yii2

Path is not an alias. From the root directory, you have to mention the path of the image to save it. Once you save, you can access using relative url.