i want to load an image in my twig but it doesnt show anything only show picture alt
this is my list.html.twig that will load image:
<img src="{{ asset('images/2.jpg') }}" alt="Symfony" />
and this is my controller :
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class InheritanceController extends Controller
{
/**
* @Route("/inherit")
*/
public function inheritAction(){
return new Response($this->render('article/list.html.twig'));
}
}
my image folder is in root directory