[eluser]jedd[/eluser]
[quote author="elaniobro" date="1267339989"]
As for the img(); does that need to have a helper loaded,
[/quote]
Yup - it's part of the [url="/user_guide/helpers/html_helper.html"]HTML Helper[/url].
Quote:Also what is the benefit of using img(); vs base_url() within the <img> tag?
It means if you move files around, it's probably going to be less work.
Your code will look cleaner (faster to type, easier to debug). Consider the difference between these two lines:
Code:
img('img/logo_tagline.png');
<img src="<?= base_url();?>img/logo_tagline.png"/>
If you read the user guide (link above) for this function you'll see that there are also benefits if you decide to:
a) use a 'media server' to serve your images,
b) you want to add a lot of common meta data (title, width, height, etc) to more than one image - you can just pull that in from a common array. Similarly you don't have to change it in lots of places (as you would with <img >) if you want to make sweeping changes.