Enable WebP preview generation without Imaginary
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Hi, I think it would be good if Nextcloud would support generating WebP previews without Imaginary, that is natively using the PHP gd functions.
PHP has supported WebP a while now, and even AVIF is supported in PHP 8.1
- Webp https://www.php.net/manual/en/function.imagewebp.php
- AVIF https://www.php.net/manual/en/function.imageavif.php
Imaginary can definitely speed up rendering, especially if it can be offloaded to other servers. However, I have found that it can be more picky and sometimes fail to render otherwise supported formats. Running on my local Nextcloud I have disabled Imaginary because of this reason. Imaginary is a slow moving project with its last release 4 years ago.
In any case, I really think it would be beneficial to use PHP gd to render files in WebP format.
I know Imagemagick is not recommended, and if WebP and AVIF generation is too slow with gd, we could perhaps use cwebp and avifenc to speed things up. Both can be built statically to make bundling easier.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files, tests, or entry points. Start by locating the existing preview-generation path and its Imaginary integration, then determine how PHP GD could generate WebP previews; done would mean WebP previews work without Imaginary while existing preview behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100