Link previews don't always populate


#1

Hello,

Has anyone experienced a situation where links pasted in to toots don’t always result in properly formatted link previews? We’re seeing a situation where the link previews don’t populate until users hit “reload” in their browser or, if one of the buttons is pressed in the toot box (favorite, or re-toot) the link preview will all of a sudden show up correctly.

Any ideas how to fix this?

Thanks!


#2

I suppose there is some kind of timeout, and if the preview can’t be generated fast enough, the toot shows up without it. Then the preview will be loaded upon a future interaction with the toot UI.

Or it may be a bug :man_shrugging:


#3

Maybe unrelated but I had encountered a problem not showing icons of remote users properly. It was because our instance was using incorrect version of Paperclip due to mistake in resolving a conflict of Gemfile(.lock) in upgrade. This also had prevented remote-following to work properly.

We had noticed this by comparing our Gemfile and the official one in the correspond version.

I hope this kind of helps.


#4

It is intentional and correct behavior.

Unless measures are taken, a lot of Federated servers request link previews to origin server at the moment when someone post a link pasted toot, like a DDoS.

For avoid it, the Mastodon sets delay to crawling link previews from 1 second to 59 seconds randomly.

This is my understanding.



#5

Is it possible to geht link previews in the timelines too and not only in the toot view?


#6

Yes. If the link preview does not appear immediately, try reloading your browser or react to the link pasted toot, when 1 minute after the posting.


#7

I don’t get link previews at all in any timeline regardless how old the toots are. I want previews for federated toots mainly.


#8

In my server…

Right after posting:
image

Reload browser 42 seconds after posting:
image

And toot view:
image

This is the same behavior anywhere on the home, local, and federation timelines. hmm… :thinking:


#9

A configuration issue at my site ?


#10

I couldn’t find the configuration item that controls the preview card … if I could think of it, it was just CSP header… :thinking: