Generate thumbnails for videos and reencode images #105
Labels
No Label
admins only
bug
design
duplicate
gimme feedback
good first issue
hmmmm
invalid
reference
wontfix
No Milestone
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hmn/hmn#105
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We have a lot of user-submitted images and videos. Most of them from Discord, and some uploaded directly to the website.
We're displaying a large number of those on the front page and in some cases it results in a 100mb download, because the images are full size and the videos are set to
preload=metadata
in order to display the first frame.We need to do the following:
I think avatars are using the new asset system by now, right? I think we should re-encode basically all the images in our whole asset system to smaller sizes / formats, and then we can start using
<picture>
elements and similar to serve up multiple formats and 2x/3x versions of images as necessary. I saw an enormous benefit on my personal website from doing similar.The big question for me is what tools to use for the conversions and what strategies to use for various output formats. On my personal website I control the image formats we use, so it's easy for me to say "image/jpeg gets reencoded as smaller jpegs, and image/png and image/webp both get reencoded as png and webp" (source). Obviously we don't quite have that luxury here, plus we need to handle gifs, which are notorious file size hogs.
(Unless we want to treat gifs as videos and extract the first frame?)
I imagine the assets table will need to be restructured to allow multiple files per asset. Curious to see what that will look like.
We might as well convert gifs to videos and treat the asset as video. The user experience would be better that way (seeking).