Docker Image for thumbnail generation in Nextcloud 24

The blog post for the latest release mentions a docker image that can handle thumbnail generation.

This release also makes it possible for large servers to use a separate Imaginary based docker service to generate thumbnails, both improving security and performance.

That sounds like a great feature :slight_smile: Unfortunately I can’t find any additional info on it. How can I install it? Can someone maybe link me to the repository?

1 Like

First you’ll need to upgrade to version 24. Documentation is not available yet afaik, You can look for it:

https://docs.nextcloud.com/server/latest/admin_manual/

After digging a little deeper I found the documentation: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html?highlight=tuning#previews

1 Like

Do you have to use Docker? I have installed imaginary using the link from Nextcloud and my Ubuntu 22.04 install tells me it’s listening on port 8088. However, I’m getting permission denied error messages in my apache/nextcloud.error log. Also I have noticed no speed improvements (so I have commented out the relevant ‘imaginary’ entries in my config.php file). This is disappointing because it seems to be a feature well worth having!

Hey all, I think I set up my imaginary docker just fine, but am getting an HTTP 400 error:

imaginary_1   | 172.20.0.6 - - [29/Jul/2022 14:06:35] "POST /pipeline?operations=%5B%7B%22operation%22%3A%22autorotate%22%7D%2C%7B%22operation%22%3A%22smartcrop%22%2C%22params%22%3A%7B%22width%22%3A256%2C%22height%22%3A256%2C%22stripmeta%22%3A%22true%22%2C%22type%22%3A%22png%22%2C%22norotation%22%3A%22true%22%7D%7D%5D HTTP/1.1" 400 2093 0.0147

This is what I put into the docker-compose:

  imaginary:
    image: h2non/imaginary:1.2
    restart: always
    environment:
      PORT: 9000
    networks:
      - nextcloud_net
    command: -enable-url-source -enable-placeholder -cpus 2

And this is how it looks in config.php:

<?php
$CONFIG = array (
    
    // supporting preview generators
    // 'preview_libreoffice_path' => '/usr/bin/libreoffice',
    'enabledPreviewProviders' => array(
        'OC\\Preview\\BMP',
        'OC\Preview\\XBitmap',
        'OC\\Preview\\MP3',
        'OC\\Preview\\TXT',
        'OC\\Preview\\MarkDown',
        'OC\Preview\Imaginary',
    ),
    'preview_imaginary_url' => 'http://imaginary:9000',
);

Is there anything I am missing?

Could it be that you are missing the double backslash?

1 Like