Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Cannot Set a Featured Image for the Homepage On Themes That Have Page Content in a Template Part #87844

Open katiebethbrown opened 6 months ago

katiebethbrown commented 6 months ago

Issue

Many of our FSE themes are setup so that the homepage content lives directly inside the Blog Home template by default:

CleanShot 2024-02-23 at 13 30 43@2x

There isn't a way to set a featured image for a template, so these sites don't have any control over or ability to set an og:image that's used for SEO and when sharing to socials. This is a regression from capabilies we had long before FSE, where the og:image could be set by adding a featured image to the page.

The current fallback appears to be to using the site icon, but in some cases that image isn't large enough for social sites to use for shares.

Discussion

Details

There is an open issue in the Gutenberg repo that proposes giving templates their own featured images, but it hasn't seen movement since it was opened in Nov 2023.

Proposed Solution

I'd like to propose that we add some UI in Jetpack's SEO settings (and the WPcom equivalent) where users can set a default/fallback featured image.

There's already a filter in Jetpack for doing this - jetpack_open_graph_image_default filter so we'd just need to expose that via the UI.

A savvy user on an atomic site could manually add that via a code snippet or via functions.php, but it would be wonderful if we could make setting a default image just as easy as entering custom meta text.

github-actions[bot] commented 6 months ago

Support References

This comment is automatically generated. Please do not edit it.

kelasante commented 5 months ago

Another request in 8035265-zen

mrfoxtalbot commented 2 months ago

This could be fixed via:

candy02058912 commented 1 month ago

As there is a core issue linked to this issue, and we've talked about lowering the priority of these types of issues p1721286471977819/1720683311.692079-slack-C01UW7SB411, setting the priority to Normal.

mrfoxtalbot commented 1 month ago

Just to clarify, this could be addressed in core but it could also be added via a Jetpack feature.

I have dropped a comment in https://github.com/WordPress/gutenberg/issues/55978#issuecomment-2241491656 see if we can have this in core sooner rather than later. 🤞

ellatrix commented 2 weeks ago

This is marked as a bug here, while it's marked as an enhancement for core. That doesn't make sense when there's a label "core fix needed". Should it be fixed in core (and be labelled as bug there), or be fixed on dotcom separately while waiting for a core enhancement?

mrfoxtalbot commented 2 weeks ago

@ellatrix, I think this should be filed as a feature request, not a bug.

The "core fix needed" makes sense if we want to address this at a core level but we can also fix it at a lower level by implementing https://github.com/Automattic/wp-calypso/issues/56055 (it's more of a workaround than a fix, but you get he idea).