codeigniter image path

I would suggest storing images in an images folder at the same level as the application folder, instead of trying to mix both PHP code and resources underneath application. Then just link to it like you did to the user guide:

<img src="../../images/myImage.jpg" />

I know more than year has passed since the question was asked but for anyone who comes looking in future, Here is my solution....

I've tried this created a folder images at same level as that of application, in main index.php added a line before last require_once statement.

define('IMAGE_PATH', APPPATH.'../images/');

and used IMAGE_PATH anywhere I wanted to display images.

Hope this helps


I just have an image folder, domain.com/images

then on the views i just use /images