Inserting an image on the home page

In order to place an image on my pawtucket home page, I added the following line on the top of the front_php_html.php file:

<img src="themes/theme1/views/Front/dsc08085_cropped.png" width="100%" height="auto">

It gave the intended result and I have been quite happy with my home page. However, I have discovered that when I am redirected to the home page after doing "Logout" as user, my image on the home page is missing. Same thing happens if I do an immediate Login too.

Will there be any help for this minor but annoying problem?


  • Hi,

    Did you see in the html source of your page if the path to your image is the same as it is when the image is well displayed?

    Can we visit your site?

  • edited February 11

    Yes, I did. The path remains same with my <img src> tag when the image is well displayed. But the path changes when the page is redirected to, on clicking the "Logout" link. The changes is as follows:

    Path when the image is well displayed:

    Path when redirected by the "Logout" link and missing the image:

    Further, inspecting the html sources on the pages do not show the above changes in the path. The source codes show the same path (the first and the correct one). But when I lick on "open Image in a New Tab" option on the browser, I notice the above change in the targeted path.

  • edited February 11

    So, the bad path looks like the good path but with index.php/Front/ inserted...

    I think about some checks... maybe...

    1. In your front_php_html.php, which html code do you use to invoque the image? Absolute or relative path?
    2. Could you check the pawtucket/app/conf/app.conf and give how is fixed the default_action parameter? (In my case, it is: default_action = Front/Index)
    3. And check how is fixed the auth_logout_url parameter? (It should be: auth_logout_url = <ca_url_root>/index.php)

  • The path I gave in front_php_html.php was <img src="themes/theme1/views/Front/dsc08085_cropped.png" width="100%" height="auto">

    I checked the pawtucket/app/conf/app.conf and found that those specific parameters are fixed exactly like the ones in your case.

  • edited February 12

    OK, so it's a relative path. You should try an absolute public path like <img src="" width="100%" height="auto">and see if resolve it.

    (Or, if you don't have yet a public URL, with your local address: <img src="" width="100%" height="auto">)

    Because the problem seems to be that your relative path themes/theme1/views/Front/dsc08085_cropped.png is added to a root-like path

  • That indeed resolved my problem. Thank you darrigan for this valuable help 🙏🙏🙏.

Sign In or Register to comment.