mdshack / shotshare

Open source image sharing application
https://demo.shotshare.dev/
MIT License
133 stars 8 forks source link

Image preview embed for Discord et. al. #46

Closed EmberHeartshine closed 1 month ago

EmberHeartshine commented 7 months ago

Title. Many image hosts have an embed that serves the image if it's linked on a service that's capable of displaying URL previews like Discord, Twitter, etc). I don't know what would go into this from a technical standpoint but it would be nice to have.

mdshack commented 5 months ago

Spent a fair bit of time testing on this, no matter what meta tags I tried, I was not able to get Discord displaying these images from the shot view, will revisit this soon though and see if I can figure it out.

EmberHeartshine commented 5 months ago

Even <meta property="og:image" content="[image link]"> ?

mdshack commented 5 months ago

Indeed @EmberHeartshine, here's some of the tags I tried.

EmberHeartshine commented 5 months ago

I'm not familiar with vue formatting, is the colon before content removed when processing for the client?

mdshack commented 5 months ago

I'm not familiar with vue formatting, is the colon before content removed when processing for the client?

Correct, : indicates an expression as opposed to a static value

bentasker commented 2 months ago

The reason that the changes above don't work is that they rely on javascript injecting the tags. Most metdata scrapers don't render pages, they just fetch the base HTML and look for tags.

This PR should do what's needed: https://github.com/mdshack/shotshare/pull/62

mdshack commented 1 month ago

The reason that the changes above don't work is that they rely on javascript injecting the tags. Most metdata scrapers don't render pages, they just fetch the base HTML and look for tags.

This PR should do what's needed: #62

Good catch and thank you for opening a PR!