Ghost(Pro): feature_image is null when rendering homepage via data: page.enter

Hi everyone,

I’ve been debugging this issue for quite a while and finally reduced it to what I believe is a minimal reproducible example.

Environment

  • Ghost(Pro)
  • Ghost 6.x
  • Custom theme based on Starter/Casper

My homepage is configured through routes.yaml like this:


routes:
  /:
    template: page
    data: page.enter

collections:
  /blog/:
    permalink: /{slug}/
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

The Page with slug enter has:

  • a Feature Image assigned
  • “Show title and feature image” enabled

Inside page.hbs I’m using the standard Ghost wrapper:


{{#post}}

<p>Title: {{title}}</p>
<p>Slug: {{slug}}</p>
<p>URL: {{url}}</p>
<p>ID: {{id}}</p>

{{#if feature_image}}
<p>Feature image EXISTS</p>
{{else}}
<p>Feature image MISSING</p>
{{/if}}

<img src="{{img_url feature_image}}" />

{{/post}}

Results

Everything below resolves correctly:

  • :white_check_mark: title
  • :white_check_mark: slug
  • :white_check_mark: url (/enter/)
  • :white_check_mark: id (correct Page ID)

However:

  • :cross_mark: feature_image is always null
  • :cross_mark: {{img_url feature_image}} outputs nothing

Things already verified

  • The Feature Image is definitely assigned.
  • “Show title and feature image” is ON.
  • The correct Page is being loaded (confirmed by title, slug, URL and ID).
  • routes.yaml is active and working.
  • /enter/ correctly redirects to / because the page is used as the homepage.
  • I also tested replacing {{#post}} with {{#page}} after reading a suggestion elsewhere, but Ghost rejects the theme because {{#page}} is not a valid Handlebars helper.

My question

Is it expected that feature_image is unavailable when a Page is rendered through:


routes:
  /:
    data: page.enter

or does this indicate a bug/regression?

If this is expected behavior, what is the correct way to access the Page’s Feature Image in this routing setup?

I’m happy to test anything on my Ghost(Pro) instance if someone can point me in the right direction.

Thanks!