//index.html.php
<?php foreach ($view['assetic']->image(
array('@AppBundle/Resources/public/images/test.png')
) as $url): ?>
<div id="title">
<h1><a href="/home/#"><img alt="logo" src="<?php
echo $view->escape($url); ?>"> </a>
</h1>
</div>
<?php endforeach ?>
Above is my code in template after adding, I executed assetic:dump and it generated a images in web/images/ , still am not able to see images on my page. It is throwing 404 error for images. Kindly let me know what going wrong here.
Note: Tried specifying image path in asset.yml and also LiipImagineBundle, nothing helped.
Assetics and assets are different. do an
bin/console assets:dumpto put the resources of your bundle in the web directory then use your images like