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')}}"/> 

look symfony book here


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -