Skip to content

Inconsistent picture rendering #828

@tomy0000000

Description

@tomy0000000

Issue description

According to the shortcode documentation, the following two methods of image rendering should yield the same result:

{{< figure
    src="pittsburgh-in-snow.jpg"
    alt="Abstract purple artwork"
    caption="Test"
>}}
![Abstract purple artwork](pittsburgh-in-snow.jpg "Test")

However, this seems to be different...

CleanShot 2024-03-11 at 16 18 47@2x

The problem here seems to be that they're rendered with different templates:

  • figure shortcode use the layouts/shortcodes/figure.html shortcode template
  • Markdown uses the layouts/_default/_markup/render-image.html render hook

Kind of confusing to understand the purpose of the figure shortcode, but after getting to know this better, I may be able to work on a fix for this.

Theme version

v2.8.1

Hugo version

hugo v0.123.4-21a41003c4633b142ac565c52da22924dc30637a+extended darwin/amd64

Which browser rendering engines are you seeing the problem on?

Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.)

URL to sample repository or website

No response

Hugo output or build error messages

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions