3

I have created a default Custom HTML module, and put few thumbnail images and added hyperlinks. And when i see preview it show broken image link on few menus and some time it work perfectly. I checked both image urls from front-end.

Broken Image url: mysite.com/entertainment/images/geo_news.jpg

Working image url: mysite.com/images/geo_news.jpg

And my thumbnails are in /images/ directory

I just dont understand why on specific menu or browser it display broken link on few menu items? although it is working fine on other menus or on home page. I check backed and hyperlinks are fine. Even i cleared Joomla Cache but same problem.

2 Answers 2

2

Check that you are linking correctly to your images in the custom module. Note the difference between absolute and relative paths:

Relative Path
Relative paths can only be used when linking to content on the same domain. When using a relative path, the browser will look for the resource relative to the location of the link.

  • If you add a / before the relative path, it will start from the root folder of your domain.
  • If you don't include /, the path will be relative to your location. Usually this is the Joomla root directory.

Absolute Path
Absolute paths start with http:// and is the full path to your image. In your case it should be: http://YOURSITE.com/images/geo_news.jpg. Test this URL in the browser bar, is should display your image.

Absolute paths is the safest solution, as it doesn't depend on what folder you're linking from, but you might get broken links if you change your domain name.

I suggest you try both options and see what works best for your setup:

<img src="http://YOURSITE.com/images/geo_news.jpg">

or

<img src="/images/geo_news.jpg">
2

I think my problem has been solved. Changed plugin order, and put System-SEF plugin before System-Cache. Broken image links are working now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.