Images displayed differently on pages accessed with page id and pretty URL
Permalink
I have images located in "themes/mytheme/images/" folder.
When I access my page using page id such ashttp://localhost/mysite/index.php?cID=100,... this img tag displays fine:
However, when I access the same page using pretty URL equivalent such ashttp://localhost/mysite/products/catalogue/product1,... the above img tag displays nothing.
If I add "mysite" to the img tag like this, it works on both the above instances:
Not sure what exactly is happening. Should I always use absolute paths for images to be on the safe side? Is there another way around this?
When I access my page using page id such ashttp://localhost/mysite/index.php?cID=100,... this img tag displays fine:
<img alt="" src="themes/mytheme/images/image1.jpg">
However, when I access the same page using pretty URL equivalent such ashttp://localhost/mysite/products/catalogue/product1,... the above img tag displays nothing.
If I add "mysite" to the img tag like this, it works on both the above instances:
<img alt="" src="/mysite/themes/mytheme/images/image1.jpg">
Not sure what exactly is happening. Should I always use absolute paths for images to be on the safe side? Is there another way around this?