Creating WebP, AVIF, JXL thumbnails and in WebP

Nextcloud version: 30.0.0
Operating system and version: FreeBSD 13.3
Apache or nginx version: nginx/1.26.2
PHP version: PHP 8.3.11
ImageMagick: ImageMagick 7.1.1-26 Q16-HDRI

enabledPreviewProviders is set as follows

  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\BMP',
    1 => 'OC\\Preview\\GIF',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\Krita',
    4 => 'OC\\Preview\\MarkDown',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\OpenDocument',
    7 => 'OC\\Preview\\PNG',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\XBitmap',
    10 => 'OC\\Preview\\Movie',
    11 => 'OC\\Preview\\AVIF',
    12 => 'OC\\Preview\\JXL',
    13 => 'OC\\Preview\\HEIC',
    14 => 'OC\\Preview\\WEBP',
  ),

But only HEIC is working, while there are no thumbnails for Avif, JXL and WebP.

There is nothing in logs, from uploading to accessing.
Well, except those two, but I guess they are not related
RuntimeException image not found: image:apps/whiteboard.svg webroot: serverroot:/usr/local/www/nextcloud
DriverException An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nextcloud.cr.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

There is also nothing in Nginx and PHP logs.

I also tried 'preview_format' => 'webp',, but all previews are still generated in jpeg and png.

Is there anything else specific missing to get it all working?

Hello,

have you found a reference about webp and avif is supported for preview?

Found nothing in the docs.

That only has an effect when using Imaginary. I guess that’s the only way to get the previews you want to have, see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#previews

2 Likes

You should read this post.
It explains exactly which preview provider are available.

hth.


Much and good luck,
ernolf

Yes, that’s correct, I did build a solution for GD, but my pool request was lost. There is a solution with AVIF, it worked reliably up to 1080p. The problem was decoder problems on Android, without a library it doesn’t work above 1080p. Or more accurately 10 megapixels. So AVIF won’t be available for the time being. In theory it does exist, but it just won’t be merged. I actually wanted to work on support for the various apps right away, but I noticed that many people just don’t want to do it. That wasn’t the case with AVIF either, I also received a rejection in the WebP case, which is a picture gallery app that is listed. So you can forget about it natively. The most that is possible is an app that shows you the image in the file browser. For all other things, nextcloud needs to be changed and also the views regarding AVIF in many app programmers. Users should also be informed about this. I have often noticed that many people always think, efficiency is great and then forget about performance. Add AVIF Thumbnail Generation by JanisPlayer · Pull Request #40048 · nextcloud/server · GitHub Anyone who wants to can finish it, but I didn’t manage it. I didn’t even get any feedback from the developers. One wrote me something and never got back to me.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.