Referencing images that belong to an Advanced Module

edited December 2011 in Modules
How do I reference an image stored in fuel/modules/store/assets/images within one of the Store's view files?

I have a view file called success.php in the store/views directory that references an image stored in the same module's assets folder using this syntax:

<img src="../assets/images/gift-certificates/gc-3day.png">

This does not pull up the image. How can I enable the files in the modules assets directory to be browseable? Do I have to change permissions on the folder or add a custom route somewhere?

Erik

Comments

  • edited 9:41AM
    Try using the img_path function to pull up the image using the second parameter which is the module folder to pull from:
    <img src="<?php echo img_path('gift-certificates/gc-3day.png', 'store')?>">
    The main .htaccess blocks access to any files but should allow files in the assets folder through.
Sign In or Register to comment.