nextcloud / nextcloud/server

Enable WebP preview generation without Imaginary

Open
#46,611 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: previews and thumbnails
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

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.