Ideas for module: capture screenshot, store page info

Created on 18 October 2021, almost 4 years ago
Updated 21 April 2025, 3 months ago

This seems to be useful as a foundation for more features to get more info from the link into Drupal.

For example, capturing the site title, or thumbnail from open graph tags?

Is it possible to take a screenshot of the page to use as a thumbnail?

✨ Feature request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom d.fisher
  • πŸ‡¬πŸ‡§United Kingdom d.fisher
  • πŸ‡¬πŸ‡§United Kingdom d.fisher

    I like this idea. The issue with relying on meta tags is that a lot of sites won't use them. I wonder if we could leverage Puppeteer to grab a screenshot of the webpage and save it as a file, but I believe this requires having node.js.

    Here's the documentation for when I come back to this:
    https://pptr.dev/guides/screenshots

    This isn't going to be straightforward but it's a really good idea that I'd definitely like to look into.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    I think we would need to be able to run an extra service alongside drupal.

    Getting a POC that works in DDEV would be cool.

  • πŸ‡¬πŸ‡§United Kingdom d.fisher

    Had some discussions about this issue with others and the consensus is that this has the potential to drastically bloat what is quite a simple module and if pursued should almost certainly be implemented as an optional sub module that people can switch on if they desire the functionality. As an intermediate step could we perhaps add a field to the media entity 'link' that allows the upload of a custom thumbnail? The issue with this approach is that I don't want to overcomplicate any custom implementations that people are layering on after installation of the module.

Production build 0.71.5 2024