Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post featured image block: Allow using "first image" as a fallback #39170

Open
davipontesblog opened this issue Mar 2, 2022 · 8 comments · Fixed by efu98/gutenberg#1 · May be fixed by #65107
Open

Post featured image block: Allow using "first image" as a fallback #39170

davipontesblog opened this issue Mar 2, 2022 · 8 comments · Fixed by efu98/gutenberg#1 · May be fixed by #65107
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@davipontesblog
Copy link

What problem does this address?

One feature that is available in the classic WordPress Customizer experience for many themes is the option to “Automatically use the first image in post” as a fallback for featured images. Bringing this option into the new Post Featured Image block would also shorten the product gap in the editing experience with block themes today.

What is your proposed solution?

To expose a setting in the UI (Block settings sidebar) to allow users to select this option as a fallback when no featured image is selected in the post.

@skorasaurus skorasaurus added [Type] Enhancement A suggestion for improvement. [Block] Post Featured Image Affects the Post Featured Image Block labels Mar 2, 2022
@skorasaurus
Copy link
Member

skorasaurus commented Mar 2, 2022

Thanks for making this issue; I've used this feature in some classic themes as well.

related #34865 which requests inserting a default specified image as a fallback.

@paaljoachim
Copy link
Contributor

paaljoachim commented Sep 1, 2022

Thinking out loud...

What if we added an option to preferences giving the user the opportunity to turn on "Use first image as featured"?
Or as @carolinan suggested here #39170 adding an option to Global Styles regarding a fallback image.

@draganescu @jasmussen

@jasmussen
Copy link
Contributor

I like this feature, I used to implement it in my decades-old WordPress themes, and it could be neat. I think we need to evolve and mature the "Use featured image" interface first, however, so that the experience of assigning that across all media blocks (like Cover, Media & Text and others) feels intuitive and natural. Once that flow is solid it seems like it would be a smaller order to add "Use first uploaded image" to the list of options.

@gaambo
Copy link
Contributor

gaambo commented Feb 5, 2024

For anyone searching for this: The attribute useFirstImageFromPost was introduced in Gutenberg 17.5.0: #56573
The UI is just not there, but for building patterns/block-themes, it's already usable :)

@liviopv
Copy link

liviopv commented Apr 30, 2024

This really should be a user-facing feature!

@mrfoxtalbot
Copy link

This would be really convenient and intuitive if we added as a Global Styles fallback option.

@paaljoachim
Copy link
Contributor

This might be the wrong place to add the following comment as I believe there is an issue for this somewhere in the Gutenberg repo.

I am watched Jamie Marsland's video on WordPress.com Youtube channel here:
https://youtu.be/5WR5aFp0i5g?si=HfsSacV-72QWfEWf

One comment mentioned:
"I wish there was a way to set a default featured image site wide. That would be super helpful as a blogger."

Setting first image and/or featured image as a Global setting will be very helpful.

@mrfoxtalbot
Copy link

mrfoxtalbot commented Jun 26, 2024

"I wish there was a way to set a default featured image site wide. That would be super helpful as a blogger."

Not only that, but if the homepage is set to "Recent Posts", there is no way to set a featured image at all, see:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
7 participants