bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
9.71k stars 1.24k forks source link

If website doesn't allow previewing image, it won't show up in embed #4962

Open Tanza3D opened 2 months ago

Tanza3D commented 2 months ago

Describe the bug When linking to a website, if the url given by the website initiates a download instead of previewing the image (as happens with most S3 providers), Bluesky will not preview the image in the embed

e.g.

https://untonemusic.com/img/release/my-style/cover.jpg image https://bsky.app/profile/tanza.me/post/3l26d37525j2t

To Reproduce

Steps to reproduce the behavior:

  1. Post a link to a website with the above behaviour (e.g. https://untonemusic.com/release/my-style)

Details

Happens on android and web, haven't tested iOS but im assuming it's serverside

surfdude29 commented 2 months ago

I can confirm this on iOS too.

Someone from the Bluesky team will be able to give a proper answer, but in the meantime I noticed two things.

Firstly, if you use a website like this the Facebook and LinkedIn cards show up fine but not the Twitter one. It complains: Oh no – there’s no Share Image defined! and also The ratio of your twitter:image isn't optimal. I don't know if these errors have any relevance here but I thought they might be worth mentioning.

Also, the output from cardyb (which AIUI generates the link cards on Bluesky) seems to find the image URL OK:

{"error":"","likely_type":"html","url":"https://untonemusic.com/release/my-style","title":"UNTONE Music / Release / My Style","description":"Released Friday, 16th Aug 2024","image":"https://cardyb.bsky.app/v1/image?url=https%3A%2F%2Funtonemusic.com%2Fimg%2Frelease%2Fmy-style%2Fcover.jpg"}

but then is unable to serve the image:

{"error":"Unable to serve image from URL","likely_type":"","url":"","title":"","description":"","image":""}