Vés al contingut principal

Configuració de les galetes

Fem servir galetes per assegurar les funcionalitats bàsiques del lloc web i per a millorar la teva experiència en línia. Pots configurar i acceptar l'ús de galetes, i modificar les teves opcions de consentiment en qualsevol moment.

Essencials

Preferències

Analítiques i estadístiques

Màrqueting

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

Avatar: Pierre Mesure Pierre Mesure

Títol

  • +{"en"=>"Use an image from the page as meta image for link previews (meta image)"}

Cos

  • +["

    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 gid://metadecidim/Decidim::Hashtag/416/455 (External link) and gid://metadecidim/Decidim::Hashtag/417/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.

    "]

Confirmar

Si us plau, inicia la sessió

La contrasenya és massa curta.

Compartir