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

Allow implicit and explicit definition of the default image post #573

Open
poppastring opened this issue Sep 29, 2021 · 1 comment
Open

Comments

@poppastring
Copy link
Owner

poppastring commented Sep 29, 2021

The main image of a blog post is implicitly defined as the first image found in the HTML (see code here), we could make this more explicit in certain scenarios.

My suggestion is to ensure that the image can be identified by a pre-defined class name as follows:
<img class="hero-image" src="/someimge.jpg" >

The code should find this image regardless of where it is in the post and present it as the hero image.

@poppastring poppastring changed the title Allow implicit and explicit definition of the image post Allow implicit and explicit definition of the default image post Nov 22, 2021
@clemensv
Copy link
Contributor

The post already has a data field for the URL. That data field should be filled with the upload from the edit page if empty, but should also be settable to an external URL (e.g. Flickr) that might not even be embedded in the post text and then is only used as the teaser image, e.g. in Twitter cards.

I would also like a second image URL that can be optionally set for a page banner if the template wants/needs it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants