Hashtags in Image File name Causing Error

Not sure if this is working as intended.

My old filename was “Screenshot 2023-04-17 at 12-46-20 Learning F# The F# Software Foundation.png”

This was causing error (see screenshot)

with src="{{ $post_image.RelPermalink }}" in a partial where

    {{ $post_images := .context.Resources.ByType "image" }}
    {{ if (gt (len $post_images) 0) }}
    {{ $post_image := index $post_images 0 }}

My new filename was “Screenshot 2023-04-17 at 12-46-20 Learning FSharp The FSharp Software Foundation.png” and the issue is fixed.

A hash in a URL precedes the fragment. The behavior is standard and expected.

As a best practice, do not include capital letters or characters other than hyphens in your file names. This guidance is not specific to Hugo.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.