Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

[BUG] Featured Images seem to HAVE to be called featured-image.<extension> in order to work #11

Closed

Description

@powershellpr0mpt

Describe the bug

I have tried featured images in various options, with random names, various yaml tags, when not called featured-image. it will cause the image to produce a broken link, even when using Page Resources as described.

Expected behavior

featuredImage: picture.jpg

or

resources:
- name: "picture"
  src: "picture.jpg"

should display the Featured Image picture.jpg

Instead, it ONLY works when naming it featured-image.

Build Environment

  • OS: Windows 10 Enterprise [2004/19041.685]
  • Theme version/commit 1.1.0
  • Hugo version Hugo Static Site Generator v0.79.1/extended windows/amd64

Please try to use Hugo extended version before opening the issue.

Preview Environment

  • OS: Windows 10 Enterprise [2004/19041.685]
  • Browser Edge Chromium

Activity

  1. added
    bug
    on Jan 3, 2021
  2. self-assigned this
    on Jan 3, 2021
  3. uPagge commented on Jan 3, 2021

    @uPagge
    Owner

    Thanks for the message, I will study how you will have free time

  4. uPagge commented on Jan 3, 2021

    @uPagge
    Owner

    I researched your question

    You cannot change the name field - it must always be featured-image. This allows the template to understand that this picture is being used for a preview. Only the src field changes.

    For example so

    resources:
    - name: "featured-image"
      src: "ssh_config.jpg"

    I checked this option works

  5. reopened this on Jan 3, 2021
  6. uPagge commented on Jan 3, 2021

    @uPagge
    Owner

    However, there really is a problem with the featuredImage variable, I will try to solve it in the next version.

  7. nareshganesan commented on Mar 7, 2021

    @nareshganesan

    @uPagge Thanks for your awesome work!

    Is there a way to have a featured image specific to light/dark mode? Not sure if this is in the roadmap.

  8. uPagge commented on Mar 7, 2021

    @uPagge
    Owner

    @nareshganesan I’ll think if this can be implemented, it’s better to create a separate issue feature so that I don’t forget about it))

  9. nareshganesan commented on Mar 7, 2021

    @nareshganesan

    @uPagge I have raised issue #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions