this post was submitted on 18 Jun 2023
5 points (100.0% liked)

lemmy.wtf meta

171 readers
1 users here now

Anything about the lemmy.wtf instance and its moderation.

For discussion about the Lemmy software project, go to c/lemmy.

founded 2 years ago
MODERATORS
 

Does anybody know why and when thumbnails for YouTube videos are shown or not? It appears to depend on the lemmy instance the posts are served from:

Without Thumbnails

With Thumbnails

Update: It's not only YT thumbnails which aren't shown. This is your post about the free 24 slot bag as shown on lemmy.wtf (without thumbnail), lemmy.world (without thumbnail) and feddit.de (with thumbnail):

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 2 years ago (1 children)

I've been trying to troubleshoot it. It makes very little sense to me, that it doesn't show thumbnails from local posts on lemmy.wtf, but if you can via another instance, the thumbnails show up.

[–] necropola 3 points 2 years ago (1 children)

But you are getting the same results as me when trying the links? The first 2 have thumbnails and the last 2 don't, right?

[–] [email protected] 3 points 2 years ago (2 children)
[–] necropola 3 points 2 years ago* (last edited 2 years ago) (1 children)

That's really weird. I already went through the issue tracker on GitHub for both the lemmy backend as well as the frontend, but couldn't find anything. I also checked the documentation whether there is a configuration option somewhere. Nothing.

~~My guess is that the thumbnail is extracted (read from the opengraph tag available via the posted URL) in the frontend (and not the backend).~~ (wrong guess)

The only thing I could find on the issue tracker which might be related is this:

https://github.com/LemmyNet/lemmy-ui/issues/709

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago) (1 children)

I have no idea why it is happening. The only thing I can think of is Cloudflare tunnel, but why would that keep the thumbnails from loading? I send a message to the admin of Lemmy.world.

edit: I am also trying to troubleshoot why users from kbin.social can't subscribe to here and vice versa.

[–] necropola 3 points 2 years ago (1 children)

I was able to subscribe from lemmy.world to kbin.social (yesterday or the day before). I tried it on another account from feddit.de today and it did not work. My guess is a problem at kbin.social.

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago) (1 children)

This works:

This doesn't work:

The difference between the two communities at lemmy.world, is that c/selfhosted has been around for a long time and c/xcode was created just a few days ago. It seems that only communities that initially connected with kbin.social work, but not new communities.

[–] necropola 3 points 2 years ago* (last edited 2 years ago)

I see you have been discussing this with the people & mod of the GW2 magazine on kbin.social already. To me it really seems to be an issue on their side. As I mentioned above: I currently cannot subscribe from feddit.de to their GW2 magazine, either.

Update: I was now able to subscribe to their GW2 magazine from feddit.de, but it does not display any posts.

[–] necropola 3 points 2 years ago (1 children)

I also found this

https://github.com/LemmyNet/lemmy-ui/issues/20

There is an environment variable LEMMY_UI_DISABLE_CSP (default : false) to configure lemmy-ui. Do you set this on your instance or do you set a Content-Security-Policxy Header somewhere in your webserver/nginx config?

[–] [email protected] 1 points 2 years ago (1 children)

I just use the settings as it is shown in the installation guide for Docker: https://join-lemmy.org/docs/en/administration/install_docker.html

[–] necropola 3 points 2 years ago* (last edited 2 years ago) (1 children)

OK. Looks like the CSP headers are the same on working and not working instances.

What I found surprising is that chrome loads the thumbnail without accessing the actual YT URL (contrary to what I expected) from the "pictrs" server of the instance serving the post. Which means that the thumbnail gets only extracted once and is then stored along with the post.

[–] necropola 3 points 2 years ago* (last edited 2 years ago)

Brainstorming

  • Thumbnail extraction definitely happens in the backend.
  • Thumbnails do neither work on lemmy.wtf nor lemmy.world but work on feddit.de
    • Does feddit.de extract the missing thumbnail when creating/updating the post? ➡ Yes, I think so
    • Or does it expect the thumbnail to be transmitted alongside the post? ➡ No, I don't think so
  • lemmy.world does not use cloudflare (I think) but they are also (like lemmy.wtf) using docker (I think)

Also Not Working on lemmy.world

But does on feddit.de

It's not only YT thumbnails which aren't shown. This is your post about the free 24 slot bag as shown on lemmy.wtf (no thumbnail), lemmy.world (no thumbnail) and feddit.de (with thumbnail):