big images have no thumbnails/previews

Hello,

please help me, recently I got pretty big pictures and the OC server is not generating thumbnails and previews. In case of smaller pictures, there is no problem.

Image info (one of many):
root@webhost1:/tmp# identify 20250713-081717-ZD.JPG
20250713-081717-ZD.JPG JPEG 7008x4672 7008x4672+0+0 8-bit sRGB 23.8924MiB 0.030u 0:00.166

I tried to increase config parameters, but still no success:
“enable_previews”: true,
“previewJPEGImageDisplayQuality”: “25”,
“preview_max_x”: “10000”,
“preview_max_y”: “10000”,
“preview_max_filesize_image”: “-1”,
“preview_max_scale_factor”: “10”,
“preview_max_dimensions”: “10000x10000”

Tried to increase the IM policy: /etc/ImageMagick-6/policy.xml
From:
policy domain=“resource” name=“memory” value=“256MiB”
policy domain=“resource” name=“map” value=“512MiB”
policy domain=“resource” name=“area” value=“128MP”
To:
policy domain=“resource” name=“memory” value=“1024MiB”
policy domain=“resource” name=“map” value=“2048MiB”
policy domain=“resource” name=“area” value=“256MP”

Interestingly, the IM CLI convert the image without problem:
convert 20250713-081717-ZD.JPG -quality 60 output2.jpg -verbose

PHP Memory limit is increased also from 256MB to 512MB (its a ~small picture archive server):
memory_limit = 512M

Steps to reproduce

  1. Upload any picture taken by my friend with his Sony camera.

Expected behaviour

After upload Thumbnails/previews generated

Actual behaviour

The upload completes, the files can be downloaded, but the thumbnails are not generated, so only stock image icon is visible.
“Could not generate a preview of this file. Please go to the next slide while we remove this image from the slideshow”

Server configuration

Operating system: Debian GNU/Linux 11 (bullseye)

Web server: apache2 2.4.62-1~deb11u2
root@webhost1:/var/www/owncloud# dpkg -l | grep apache
ii apache2 2.4.62-1~deb11u2 amd64 Apache HTTP Server

Database:

root@webhost1:/tmp# dpkg -l | grep mariadb-server
ii mariadb-server 1:10.5.29-0+deb11u1 all MariaDB database server (metapackage depending on the latest version)

PHP version:

root@webhost1:/tmp# dpkg -l | grep php7.4
ii libapache2-mod-php7.4 7.4.33-1+deb11u8 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php7.4 7.4.33-1+deb11u8 all server-side, HTML-embedded scripting language (metapackage)

root@webhost1:/var/www/owncloud# php -v
PHP 7.4.33 (cli) (built: Mar 19 2025 19:57:26) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

ownCloud version: (see ownCloud admin page)

Verzió

ownCloud 10.15.2 (stable)

Updated from an older ownCloud or fresh install:
older

Where did you install ownCloud from:
The system was installed around ~ 2017.07, it was Debian 9 system in the first place and OC was version 10.0.1 or 10.0.2

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

root@webhost1:/var/www/owncloud# sudo -u www-data php occ config:list system
{
“system”: {
“trusted_proxies”: [
“192.168.70.10”
],
“updatechecker”: false,
“instanceid”: “oc287a8k0f6z”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“192.168.70.4”,
REMOVED SENSITIVE VALUE
],
“datadirectory”: “/var/oc_data”,
“overwrite.cli.url”: “http://192.168.70.4/owncloud”,
“dbtype”: “mysql”,
“version”: “10.15.2.0”,
“dbname”: “owncloud_db”,
“dbhost”: “127.0.0.1”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “Europe/Berlin”,
“installed”: true,
“maintenance”: false,
“loglevel”: 0,
“theme”: “”,
“files_antivirus.av_cmd_options”: “”,
“files_antivirus.av_path”: “”,
“allow_user_to_change_mail_address”: “”,
“remember_login_cookie_lifetime”: 1296000,
“session_lifetime”: 1200,
“session_keepalive”: true,
“http.cookie.samesite”: “Strict”,
“trashbin_retention_obligation”: “auto”,
“trashbin_purge_limit”: 50,
“operation.mode”: “single-instance”,
“log_type”: “owncloud”,
“logfile”: “/var/oc_data/owncloud.log”,
“syslog_tag”: “ownCloud”,
“log.syslog.format”: “[%reqId%][%remoteAddr%][%user%][%app%][%method%][%url%] %message%”,
“log_rotate_size”: 104857600,
“enable_previews”: true,
“previewJPEGImageDisplayQuality”: “25”,
“enabledPreviewProviders”: [
“OC\Preview\SGI”,
“OC\Preview\Heic”,
“OC\Preview\BMP”,
“OC\Preview\GIF”,
“OC\Preview\JPEG”,
“OC\Preview\MarkDown”,
“OC\Preview\MP3”,
“OC\Preview\PNG”,
“OC\Preview\TXT”,
“OC\Preview\XBitmap”
],
“filelocking.enabled”: true,
“filelocking.ttl”: 3600,
“debug”: true,
“preview_max_x”: “10000”,
“preview_max_y”: “10000”,
“preview_max_filesize_image”: “-1”,
“preview_max_scale_factor”: “10”,
“preview_max_dimensions”: “10000x10000”
}
}

List of activated apps:

root@webhost1.:/var/www/owncloud# sudo -u www-data php occ app:list
Enabled:

  • activity:
    • Version: 2.7.2
    • Path: /var/www/owncloud/apps/activity
  • comments:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/comments
  • configreport:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/configreport
  • dav:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/dav
  • diagnostics:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/diagnostics
  • federatedfilesharing:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/federatedfilesharing
  • federation:
    • Version: 0.1.0
    • Path: /var/www/owncloud/apps/federation
  • files:
    • Version: 1.6.0
    • Path: /var/www/owncloud/apps/files
  • files_antivirus:
    • Version: 1.2.2
    • Path: /var/www/owncloud/apps/files_antivirus
  • files_pdfviewer:
    • Version: 1.0.2
    • Path: /var/www/owncloud/apps/files_pdfviewer
  • files_sharing:
    • Version: 0.14.0
    • Path: /var/www/owncloud/apps/files_sharing
  • files_texteditor:
    • Version: 2.6.1
    • Path: /var/www/owncloud/apps/files_texteditor
  • files_trashbin:
    • Version: 0.9.1
    • Path: /var/www/owncloud/apps/files_trashbin
  • files_versions:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/files_versions
  • firstrunwizard:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/firstrunwizard
  • gallery:
    • Version: 16.1.2
    • Path: /var/www/owncloud/apps/gallery
  • market:
    • Version: 0.9.0
    • Path: /var/www/owncloud/apps/market
  • notifications:
    • Version: 0.6.0
    • Path: /var/www/owncloud/apps/notifications
  • provisioning_api:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/provisioning_api
  • systemtags:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/systemtags
  • updatenotification:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/updatenotification

Are you using external storage, if yes which one: local/smb/sftp/…
No

Are you using encryption:
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
No.

Client configuration

Browser:
Firefox 128.13.0esr (64-bit)

Operating system:
Windows 10 Enterprise 22H2

Logs

Web server error log

No Error in the logs.

ownCloud log (data/owncloud.log)

There is no error in the logs.

Browser log

HTTP/1.1 404 Not Found
Date: Mon, 28 Jul 2025 10:26:15 GMT
Server: Apache/2.4.62 (Debian)
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
X-Robots-Tag: none
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=ngMHkoU5XFiF7r75R1%2BMy2ylWd692h01hXyLXdvvKn%2FqZdaIqdro1aHO9xGfOQ5svKb%2FaEmxta183SFV53NeNHQX%2BYmOrIf6Lhk%2FMpzgJTky11Tb%2B82TVnGBdLTe%2BvJ8; expires=Mon, 28-Jul-2025 10:46:15 GMT; Max-Age=1200; path=/; HttpOnly; SameSite=Strict
Content-Security-Policy: default-src ‘self’; img-src ‘self’; style-src ‘self’ ‘unsafe-inline’; font-src ‘self’;
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked

What am I missing?
Thanks!

Welcome to the ownCloud Community.

You can see if this old topic helps.

Hello,

unfortunately no change:

root@webhost1:/var/www/owncloud# sudo -u www-data php occ config:system:set preview_max_dimensions --value ‘6016x6016’
System config value preview_max_dimensions set to string 6016x6016
root@webhost1:/var/www/owncloud# systemctl restart apache2.service

image

and the thumbnails are also still missing.

BR

Please, check if apache is crashing due to out-of-memory or memory limit errors.
I might be wrong, but if the image is loaded into memory, it would be around 129MB of php memory just to hold the image. That’s around 1/4 of the available memory.
If you need to deal with such big images, you might want to consider to rise the memory limit to 1GB

1 Like

Sounds like you’ve already gone deep into the config really thorough work. I’ve had similar issues with large image previews before, and in my case, it ended up being a timeout or memory bottleneck on the preview generator itself, not ImageMagick. Maybe try checking the ownCloud background jobs and see if they’re actually running properly?

Hello,

I don’t see the memory alarms, only the expected log rotate graceful restarts:

root@webhost1:~# cat /var/log/apache2/error.log
[Fri Aug 01 00:00:02.260547 2025] [mpm_prefork:notice] [pid 666863:tid 666863] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured – resuming normal operations
[Fri Aug 01 00:00:02.260595 2025] [core:notice] [pid 666863:tid 666863] AH00094: Command line: ‘/usr/sbin/apache2’
[Fri Aug 01 08:41:24.511806 2025] [mpm_prefork:notice] [pid 666863:tid 666863] AH00171: Graceful restart requested, doing restart
[Fri Aug 01 08:41:24.569830 2025] [mpm_prefork:notice] [pid 666863:tid 666863] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured – resuming normal operations
[Fri Aug 01 08:41:24.569855 2025] [core:notice] [pid 666863:tid 666863] AH00094: Command line: ‘/usr/sbin/apache2’
[Fri Aug 01 08:41:29.072636 2025] [mpm_prefork:notice] [pid 666863:tid 666863] AH00171: Graceful restart requested, doing restart
[Fri Aug 01 08:41:29.121387 2025] [mpm_prefork:notice] [pid 666863:tid 666863] AH00163: Apache/2.4.62 (Debian) OpenSSL/1.1.1w configured – resuming normal operations
[Fri Aug 01 08:41:29.121421 2025] [core:notice] [pid 666863:tid 666863] AH00094: Command line: ‘/usr/sbin/apache2’

But increased the limit of PHP to 1024MB:
root@webhost1.pigen.local:~# cat /etc/php/7.4/apache2/php.ini | grep memory_limit
memory_limit = 1024M

no luck yet :frowning:
BR

Hello,

where can I check these? In the syslogs I see that the Cron calls and runs the scheduled tasks:

root@webhost1:~# cat /var/log/syslog | grep -i “occ”
Aug 1 00:15:02 webhost1 CRON[886630]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/occ system:cron)

Aug 1 11:30:02 webhost1 CRON[889701]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/occ system:cron)
Aug 1 11:45:01 webhost1 CRON[889790]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/occ system:cron)
Aug 1 12:00:02 webhost1 CRON[889834]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/occ system:cron)
Aug 1 12:15:02 webhost1 CRON[890040]: (www-data) CMD (/usr/bin/php -f /var/www/owncloud/occ system:cron)

There was no error, even when I call it manually:
sudo -u www-data /usr/bin/php -f /var/www/owncloud/occ system:cron

But in the Documentation, there is no info about a background job for image generation:

  • OCA\\DAV\CardDAV\\SyncJobocc dav:sync-system-addressbook
  • OCA\\Federation\\SyncJobocc federation:sync-addressbooks
  • OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrashocc trashbin:expire
  • OCA\\Files_Versions\\BackgroundJob\\ExpireVersionsocc versions:expire

BR

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