Image path issue in yii2
<p>I have frontend,backend and API's in my yii2 project.I have remove front/web from url.I follow following post for that.
<a href="http://www.yiiframework.com/wiki/755/how-to-hide-frontend-web-in-url-addresses-on-apache/" rel="nofollow">http://www.yiiframework.com/wiki/755/how-to-hide-frontend-web-in-url-addresses-on-apache/</a>
But my entire images getting not found error in backend and frontend.I am facing problem to give path.I have tried following code
In params-local.php</p>

<pre><code>   Yii ::setAlias('@source', 'http://example.com');
</code></pre>

<p>In Frontend/index.php</p>

<pre><code>&lt;body style="background-image:url(.&lt;?Yii ::getAlias('@source') ?&gt;.'/images/media-bg.jpg');background-attachment:fixed;"&gt;
</code></pre>

<p>Still getting Error (#2) .Please help</p>