Skip to content
This repository has been 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
powershellpr0mpt opened this issue Jan 3, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@powershellpr0mpt
Copy link

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
@powershellpr0mpt powershellpr0mpt added the bug Something isn't working label Jan 3, 2021
@uPagge uPagge self-assigned this Jan 3, 2021
@uPagge
Copy link
Owner

uPagge commented Jan 3, 2021

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

@uPagge
Copy link
Owner

uPagge commented Jan 3, 2021

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

@uPagge uPagge closed this as completed Jan 3, 2021
@uPagge uPagge reopened this Jan 3, 2021
@uPagge
Copy link
Owner

uPagge commented Jan 3, 2021

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

@uPagge uPagge closed this as completed Jan 12, 2021
@nareshganesan
Copy link

@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.

@uPagge
Copy link
Owner

uPagge commented Mar 7, 2021

@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))

@nareshganesan
Copy link

nareshganesan commented Mar 7, 2021

@uPagge I have raised issue #54

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants