I've this appear quite simple problem re file pathways, yet I've been attempting to solve the issue with no success. Your help could be much appreciated. I am a new comer to Joomla here is my problem.

I must show a picture situated within the images folder of my component.

Example Path:

/joomlabasedir/components/com_mycomponent/images/image1.png

Wouldso would i have the ability to properly set the road to this picture, from the inside a look at my component.

I have attempted the next during my code:

<img src="./images/images1.png">

However when the page will get loaded, the src get prefixed using the SEF formatted connect to the page presently being displayed. For instance.

while viewing a 'View' known as event, rather than it pointing to : localhost/joomla/components/com_mycomponent/images/image1.png, the particular link become pointed to SEF link

localhost/joomla/index.php/component-alias/event/images/image1.png

that is clearly wrong path, bringing on a 404 error when being able to access the resource.

I have also attempted using JPATH_ROOT, JPATH_COMPONENT, as well as unsuccessful as these pathways are really giving the filesystem Pathways from the file, which regarded as local resource, and should not be loaded...

I really hope someone might help me about this apparently trivial problem, yet i can not solve...

thanks!

I believe that rather than using relative link, i ought to use absolute link...

i'm not sure how you can specify this 'absolute' link...

i have attempted while using following, but nonetheless, it doesn't work..

src="/components/com_mycomponent/images/image1.png"

resulted to

localhost/components/com.....

rather than localhost/joomla/components/....

If you work with JCE editor (i believe it's the very best), your default directory is /images/tales.

So...you have to produce a directory within the tales directory, so when you link it, just write "directoryname/image1.png" in source, or simply click on the image button, as well as your directory can have using the image inside ! Click on the image, and isert!

If you won't want to copy your image there, you are able to link like http://yoursite.com/components/com_componentname/images/image1.png just like a usual URL.

<img src="<?php echo JURI::root();?>components/com_mycomponent/images/images1.png">