Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Hero Image not displaying for Scholar

Solved by Ole Vik View solution

Started by LFL 6 years ago · 3 replies · 442 views
6 years ago

Hello everyone! Thank you for helping me out with my questions.

I have decided to migrate to the Scholar theme and use it out of the box but now I am having a weird error with the hero image. When uploading a page with the post format, the image is displayed but there is text above it saying "Hero Image for "blog title". I am not sure why this is? I also tried removing the display hero image in the frontmatter but that didn't seem to make a difference.

See page here: https://lookingforless.com/home/declutter-1-clothes

Thank you so much.

6 years ago

It's 'Alt text' which is displayed because the source of the image is empty

img alt="Hero Image for Declutter 1: Clothes" src="" />

6 years ago Solution

How are you defining the image in the Page's FrontMatter? Per the Twig-template, it needs to be either

YAML
image:
  url: filename.ext

Or

YAML
image: filename.ext

Where filename.ext is the full name of the image including extension within the Page's folder.

👍 1
6 years ago

Wow, thank you so much @OleVik! That worked perfectly. Also, thank you for this theme; it's so elegant.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 76 8 hours ago
General · by pamtbaau, 13 hours ago
1 47 12 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago