only got the download to work by changing (int)($dl <= $this->max_file_size)
to (int)($dl > $this->max_file_size)
in the current architecture this doesnt fit here. we would need to initiate embed service in display just to do a replace
eh, you could create a generic fallback outside of the array instead of putting a fallback for each embedding. customization is cool and all, but will you really create images for all embeds?
you could remove fallback from here. if an embed doesnt have a fallback it simply fail without ever trying to run. and you already check for a fallback at line 121
There's two cache keys. One at line 30 and another one at 58. both are differently
Add explicit null to headers or it will have to have every captcha file
This code is from kissu, to enable mods to regen thumbnails marked as spoiler: https://forgejo.leftypol.org/perdedora/nicochan_magali/src/branch/composer/inc/image.php#L630
@Zankaria wrote in leftypol/leftypol#65 (comment):
webp can be animated!?
Yes. https://magalichan.com/media/b86e0279efef865522ce2fcd5ed5c02ed8c39…
The bug is in this line: https://forgejo.leftypol.org/leftypol/leftypol/src/branch/config/js/show-backlinks.js#L18
Change to:
let replyId = $(this).attr('id').split('_')[1];
All of our thumbnails are webp, including gifs which we convert to animated webp.
I could only make it work using convert. gif2webp was subpar for thumbnail because of resize options and ffmpeg…
For youtube shorts you could just replace /shorts/ for /watch?v=/ and it will work like a normal embed