symfony - Symfony2 How to add img to error404 page -
i create 404error.html.twig in app/resources/twigbundle/views/exception/error404.html.twig , works have add img error page. create 404.jpg , put in 2 places. first app/resources/twigbundle/views/images/404.jpg , second app/resources/public/images/404.jpg in error file put code
<img src="../../../images/404.jpg" > <img src="../../../public/images/404.jpg" > i cleared cache, run assetic:dump, img still not show
you cannot put images in app/resources/public if bundle.
you can put in /web/images directory , show with
<img src="{{ asset('images/404.jpg')}}"/>
Comments
Post a Comment