Video thumbnails not generated for uploaded videos in Discourse forum

AI-generated summary

The discussion revolves around the absence of automatic video thumbnail generation in Discourse for uploaded videos. LoveMCJ inquires about enabling this feature by default, noting that the Insert Video plugin only supports MP4s. Arkshine explains that preloading video metadata was disabled in a recent update to prevent browsers from downloading entire videos, instead using a placeholder image that loads the video on play. RGJ and kinetiksoft express disappointment, as this change negatively impacts user experience, especially with large media libraries. Arkshine suggests a theme component to restore the previous behavior, acknowledging the developers’ rationale but advocating for an admin toggle to make the feature optional.

Does Discourse automatically generate video thumbnails for uploaded videos?

By default, Discourse does not automatically generate video thumbnails for uploaded videos. However, the Insert Video (theme component) plugin does generate video thumbnails automatically. Is there a way to enable Discourse to automatically generate video thumbnails for uploaded videos by default?

Note: The Insert Video (theme component) plugin currently only works with MP4 videos. Support for mov, ogg, webm videos is needed.

Hi,

This was the case before, but the preloading of video metadata has been disabled in a recent PR.

Preloading just metadata is not always respected by browsers, and
sometimes the whole video will be downloaded. This switches to using a
placeholder image for the video and only loads the video when the play
button is clicked.

https://github.com/discourse/discourse/pull/23807

:smiling_face_with_tear:

Thank you for your answer. :+1:

So this is quite a loss of functionality to solve a problem I didn’t even know existed.
Is it possible to turn it back on or to have the backend supply a placeholder image?

Hello,

It is possible to see corresponding reports on metadata loading the whole video and what could else lead to this PR to go into production? It seems like this be better to be optional, toggled by discourse instance’s admins, if they believe it’s needed. Now we have all the videos uploaded (a lot of media uploaded to our forum) as black boxes, which ruins the user experience. We had never had any issues that are described in the PR you referenced, and everything was fine.

@RGJ @kinetiksoft Feel free to try this component: GitHub - Arkshine/discourse-video-preloading-metdata · GitHub

It puts back the old HTML. I did not test it extensively, but it seems to work fine. :+1:

I believe the developers have a valid reason to remove this by default as it could affect the user experience. However, providing an option would be reasonable too.(well, a theme component is an option :smile:).