filepath - Path of Images inside a component in Joomla -
i have simple problem re file paths, , yet have been trying solve problem no avail. appreciated. i'm new joomla , here problem.
i show image located in images folder of component.
example path:
/joomlabasedir/components/com_mycomponent/images/image1.png
how can correctly set path image, inside view of component.
i've tried following in code:
<img src="./images/images1.png">
but when page gets loaded, src gets prefixed sef formatted link of page being displayed.
example. while viewing 'view' called event, instead of image path pointing : localhost/joomla/components/com_mycomponent/images/image1.png,
points sef formatted link show below,
localhost/joomla/index.php/component-alias/event/images/image1.png
which wrong path , results 404 error.
i have tried using jpath_root, jpath_component, , failed since these paths giving filesystem path of file, considered local resource can't loaded.
i hope can me on seemingly trivial problem failed solve.
thank you!
<img src="<?php echo juri::root();?>components/com_mycomponent/images/images1.png">
Comments
Post a Comment