Hugo v0.123 - Image invalid if it shares name of directory

After upgrading to 0.123 some images would not load anymore, specifically images that had file names where the beginning of the name was the same as the parent directory.

No image will render with the following:

content
  - notifications
    - _index.en.md
    - notifications-image.svg

And the image in markdown:

![Image](notifications-image.svg)

However, if I rename the image file to “image.svg”, the image renders. The image will also render if I only remove “notifications” from the markdown and keep the name of the actual file the same.

My question then is if this is now an expected behaviour? Seeing as the images loaded just fine earlier.

This appears to be multilingual site. If true:

  1. Is it single-host or multihost?
  2. What is the default content language?
  3. What is the language weight of the default content language?

Or just post your site config.

And, are you using an image render hook? Or does your theme? If you don’t know, post a link to the project repository.


In the absence of a custom image render hook I am unable to reproduce the problem.

git clone --single-branch -b hugo-forum-topic-48505 https://github.com/jmooring/hugo-testing hugo-forum-topic-48505
cd hugo-forum-topic-48505
rm -rf public && hugo && tree public && cat public/{de,en}/notifications/index.html

@tinaa Please follow-up on this when you have a moment. I was unable to reproduce the behavior you reported, but maybe I am missing some key information. Thanks.

Marking this as resolved. OP not responding, unable to reproduce.

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