Issue with echoing img_path in a view
I have a view where i'm trying to echo out an image path from a module that I created in the admin panel.
I just have the images currently being saved to /assets/images/galleryImages.
Right now if I try to echo the image like this,
<?php if (!empty($image->image)) : ?>
<img src="<?php echo img_path($image->image); ?>" />
<?php endif; ?>
I get the path /mysite/assets/images/image.jpg. I know the path should be /mysite/assets/images/galleryImages/image.jpg.
If I try the code like this
<?php if (!empty($image->image)) : ?>
<img src="<?php echo img_path('galleryImages'.$image->image); ?>" />
<?php endif; ?>
I get the path /mysite/fuel/modules/image.jpg/assets/images/galleryImages.
Is the img_path() function not able to handle doing 'text'.$var ?
Comments
In any case, I figured out my issue by comparing with what the demo had.