can't show images in HTML block

Permalink
Hello!

my problem is :
when I add a page the URL is
http://localhost:52048/index.php/testimonials...

so the HTML block images URL is
http://localhost:52048/index.php/images/header-area_01.png...
and can't be loaded

when I edit the page,
the images shows with URL
http://localhost:52048/images/header-area_01.png...

my image code in html is :
<img src="images/header-area_02.gif" width="266" height="130" alt="">

Thanks!

 
dwayneparton replied on at Permalink Best Answer Reply
dwayneparton
I think your problem is that in using an HTML block you are just using static html you can't set the file location dynamically. The best solution for you would probably be to make the path an absolute path, but you will have to update the code if you change it's domain name or file location.
<img src="http://your.url.com/images/header-area_02.gif" width="266" height="130" alt="">

If you had this problem in a dynamic script you would probably use something like this.
<img src="<?php echo DIR_REL; ?>/images/header-area_02.gif" width="266" height="130" alt="">
marvelou replied on at Permalink Reply
That really help !
Thank you very much~!