Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Halo.

I have another problem.
I use header and footer as snippet. In the header I have some social media buttons that direct to the social media sites, but the image doesn't show up in other pages except home page, when I inspect it in console it says "Failed To Load Given URL" while in fact the file is very accessible. In the footer, I have an image with link that directs to some external link (exactly a website) and the image doesn't show up in other pages except home page either. What is wrong?

Thanks.

Sory if I ask a lot :oops:

Attachments

I should be because the path is not relative to the current folder.
Try using absolute paths or some of the solutions provided here:
viewtopic.php?f=2&t=8827

The "<cms:show k_site_link />" approach worked fine for me.

Best regards
I know what <cms:show k_site_link/> is for. It is commonly used for css or js file directory.

But in my case, to show an image url, I use <cms:show image_file_name/> respectively to <cms:editable type="image" name="image_file_name" label="Image File Name"/>
I'll have to agree with @LordNeo - this indeed seems to be a relative path problem (perhaps compounded by prettyURLs).

But in my case, to show an image url, I use <cms:show image_file_name/> respectively to <cms:editable type="image" name="image_file_name" label="Image File Name"/>
The screenshot you posted shows the URL of the problem image as relative. Could you please explain that? Are you pasting in the path manually because the filemanager never gives back a relative path?
Ah, I'm so sorry, my bad, you guys two are right >_< ! I didn't realize it before.

after I change all of <img src="folder/file.svg"/> to <img src="<cms:show k_site_link>folder/file.svg"/> all the image files eventually show up.

Thanks a lot guys for the solution! >_<
5 posts Page 1 of 1