Processed images are not served via HTTPS

Recently I used the new image processing in some of my websites and discovered that processed images are not served via HTTPS.

Is this a bug or do I miss something?

You can see the effect here:

The big front image is served via processing, the gallery at the buttom is not yet implemented with image processing.

The processing of the front image is done like this:

{{ if .Resources.Match "intro" }}
{{ $preview := .Resources.GetMatch "intro" }}
{{ with $preview }}
{{ $scaled := .Resize "1045x" }}
<img class="image main" src="{{ $scaled.Permalink }}" alt="" />
{{ end }}
{{ end }}
{{ if .Resources.Match "introsvg" }}
{{ $preview := .Resources.GetMatch "introsvg" }}
<img class="image main" src="{{ $preview.Permalink }}" alt="" />
{{ end }}

I just viewed your site and can see all images, via https.

  • When I click the gallery photos, I see they are each served via https.
  • If I right click the big hero image, and select “open in separate tab” I can see it’s served via https.

I’m not sure what is the problem?

You would have seen the effect only in the Inspector Console because my site redirects all browser requests to HTTPS.

Meanwhile I found the solution.

Using .RelPermaLink fixes the issue.

But anyway I am disturbed because I set

baseurl = ""

in config.toml and thought Hugo would use this in any absolute URL.

But it does not as you can see with the open graph social links:

<meta property="og:url" content="" />

I am using the internal template with Hugo 0.39.