Skip to main content

Cookie settings

We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in/out whenever you want.

Essential

Preferences

Analytics and statistics

Marketing

Use an image from the page as meta image for link previews (meta image)

Avatar: Pierre Mesure Pierre Mesure

Is your feature request related to a problem? Please describe.

Thanks to some recent changes such as the ability to add images to meetings and blog posts (External link), or the possibility to embed images in any text field since 0.26 (External link), we can expect even more pieces of content to have their own pictures.

When sharing a link from a Decidim platform on social media or a messaging app, a preview is generated. See screenshots below for example.

These previews are generated with pieces of information loaded from the page's source and called meta tags.

The code that generates these meta tags in Decidim is now quite old, it was written over 5 years ago (see #455 (External link) and #1091 (External link) on Github). And as of now, the image that is used for a preview for any page within a space (a proposal, a meeting, a blog post, a budget project...) is the main image of the space itself.

Describe the solution you'd like

This was a good compromise 5 years ago but it can be quite confusing when proposals are shared on social media.

It would be good to make the image reflect the content a bit more, with fallbacks when images are lacking.

Here's a suggestion of which image to display for different types of content:

  • a meeting –> its card image
  • a blog post –> its card image
  • a budget project –> its card image
  • and since each of the above now support inline images in their description fields (as well as pages and accountability results), the first inline image could be used if there are no card images.

Now for user-generated content:

  • an initiative –> its first image
  • a proposal –> its first image
  • a user profile -> its profile picture (right now, showing the hero image)

I might be missing some but the system could be made smarter with time.

Additional context

metatags.io is a useful site to generate the cards of different social media and apps.

Could this issue have an impact on users private data?
No

Funded by
Awaiting funding.

Comment

Confirm

Please log in

The password is too short.

Share