Belchertown - Logo - relative_url

70 views
Skip to first unread message

Joachim Puttkammer

unread,
Jun 4, 2020, 6:51:11 AM6/4/20
to weewx-user
Hi,

I have a little problem with the logo. I do not want to 'download' the logo from outsite.
logo.png is stored in the images directory

/etc/weewx/skins/Belchertown/skin.conf

[Extras]
    logo_image = "logo.png"

YES logo : http://192.168.8.110/public_html/
NO logo : http://192.168.8.110/public_html/graphs/

--
[Extras]
    logo_image = "../logo.png"

NO logo : http://192.168.8.110/public_html/
YES logo : http://192.168.8.110/public_html/graphs/

---
[Extras]
    logo_image = "https://myserver/logo.png"

YES logo : http://192.168.8.110/public_html/
YES logo : http://192.168.8.110/public_html/graphs/

Joachim

Pat

unread,
Jun 4, 2020, 8:19:00 AM6/4/20
to weewx-user
Which version of the skin are you running?

You could just specify it as  "http://192.168.8.110/logo.png" and it'll work for you without "downloading from the outside".

Joachim Puttkammer

unread,
Jun 4, 2020, 11:00:23 AM6/4/20
to weewx-user
Hi Pat

Belchertown Skin Version: 1.1  is running
and "http://192.168.8.100/logo.png" doesn't work as well as "localhost" or "127.0.0.1"

Pat

unread,
Jun 4, 2020, 11:04:15 AM6/4/20
to weewx-user
That URL was a guess based on your previous replies. Can you open the image at that direct URL? If not, adjust as necessary. 

William Burton

unread,
Jun 4, 2020, 2:50:17 PM6/4/20
to weewx-user
Hello Joachim,

Since your browser-facing folder for WeeWX is /public_html, you should specify the logo using a server-relative URL:

[Extras]
    logo_image
= "/public_html/logo.png"

This works because the browser will fill-in the scheme, hostname and port so there's no need to fully-qualify the URL.

On a separate note, the public_html folder is an internal path and not normally exposed directly to browsers. One common method is to have the pages exposed as the folder /weewx which may be aliased to the folder .../public_html/weewx. If you have any questions on this topic, please start a new thread and mention if you're using Apache or Nginx and any other relevant details.

Hope this helps,
-Bill

On Thursday, June 4, 2020 at 6:51:11 AM UTC-4, Joachim Puttkammer wrote:

Joachim Puttkammer

unread,
Jun 4, 2020, 3:50:24 PM6/4/20
to weewx-user
logo_image = "/public_html/logo.png"
is the solution

Thank you Bill
Reply all
Reply to author
Forward
0 new messages