The Basics
- Nextcloud Server version (e.g., 29.x.x):
Nextcloud Hub 30.0.2
- Operating system and version (e.g., Ubuntu 24.04):
Fedora 41
- Web server and version (e.g, Apache 2.4.25):
Apache/2.4.62
- PHP version (e.g, 8.3):
PHP 8.3.13
- Is this the first time you’ve seen this error? (Yes / No):
Yes
- When did this problem seem to first start?
Always been like this since first install 29
- Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
Bare Metal
- Are you using Cloudflare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
Whenever I try to generate a preview (occ preview:generate <file>.jpg
) I get an error in console saying No preview generator available for file of typeimage/jpeg
.
Steps to replicate it (hint: details matter!):
occ preview:generate <file>.jpg
No preview generator available for file of typeimage/jpeg
Log entries
Nextcloud
Cannot find log in either data-dir nor the option under Administration Settings.
But the logs in journalctl (journalctl -eft Nextcloud
) are empty when executing the command.
Configuration
Nextcloud
occ config:list system
{
"system": {
"log_type": "syslog",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"updatechecker": false,
"check_for_working_htaccess": false,
"asset-pipeline.enabled": false,
"assetdirectory": "\/var\/lib\/nextcloud",
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"apps_paths": [
{
"path": "\/usr\/share\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/lib\/nextcloud\/apps",
"url": "\/apps-appstore",
"writable": true
}
],
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"<redacted FQDN>",
"<redacted IP>",
"127.0.0.1"
],
"overwrite.cli.url": "https:\/\/<redacted FQDN>",
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"dbtype": "mysql",
"version": "30.0.2.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "<redacted region>",
"defaultapp": "files",
"maintenance_window_start": "3",
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"maintenance": false,
"skeletondirectory": "",
"templatedirectory": "",
"enable_previews": true,
"preview_max_x": "2048",
"preview_max_y": "2048",
"preview_max_scale_factor": 2,
"preview_max_filesize_image": 200,
"preview_max_memory": 1024,
"enabledPreviewProviders": [
"\\OC\\Preview\\BMP",
"\\OC\\Preview\\GIF",
"\\OC\\Preview\\JPEG",
"\\OC\\Preview\\PNG"
],
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"theme": "",
"loglevel": 2,
"jpeg_quality": "60"
}
}
Apps
occ apps:list
Enabled:
- activity: 3.0.0
- app_api: 4.0.0
- bruteforcesettings: 3.0.0
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- lookup_server_connector: 1.18.0
- nextcloud_announcements: 2.0.0
- notifications: 3.0.0
- oauth2: 1.18.1
- onlyoffice: 9.5.0
- password_policy: 2.0.0
- photos: 3.0.2
- previewgenerator: 5.7.0
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- support: 2.0.0
- survey_client: 2.0.0
- systemtags: 1.20.0
- text: 4.1.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_ldap: 1.21.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0
- documentserver_community: 0.1.20 (installed 0.1.20)
- drawio: 3.0.3 (installed 3.0.3)
- encryption: 2.18.0
- epubviewer: 1.6.4 (installed 1.6.2)
- files_external: 1.22.0
- fileslibreofficeedit: 2.0.1 (installed 2.0.1)
- logreader: 3.0.0 (installed 2.13.0)
- photos.bak: 2.4.0
- suspicious_login: 8.0.0
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
occ config:list previewgenerator
{
"apps": {
"previewgenerator": {
"enabled": "yes",
"heightSizes": "256",
"installed_version": "5.7.0",
"squareSizes": "32 256",
"squareUncroppedSizes": "256 4096",
"types": "filesystem",
"widthSizes": "256 384"
}
}
}
occ config:list preview
{
"apps": {
"preview": {
"jpeg_quality": "60"
}
}
}
PHP
php -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
intl
json
ldap
libsmbclient
libxml
mbstring
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
random
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
php -i | grep -x gd -A 24
gd
GD Support => enabled
GD headers Version => 2.3.3
GD library Version => 2.3.3
FreeType Support => enabled
FreeType Linkage => with freetype
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
PNG Support => enabled
WBMP Support => enabled
XPM Support => enabled
XBM Support => enabled
WebP Support => enabled
BMP Support => enabled
AVIF Support => enabled
TGA Read Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning => On => On
gettext
GetText Support => enabled
Details about the image tested
mediainfo -f 20241125_154042.jpg
General
Count : 349
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Count of image streams : 1
Image_Format_List : JPEG
Image_Format_WithHint_List : JPEG
Codecs Image : JPEG
Complete name : 20241125_154042.jpg
Folder name : Downloads
File name extension : 20241125_154042.jpg
File name : 20241125_154042
File extension : jpg
Format : JPEG
Format : JPEG
Format/Extensions usually used : h3d jpeg jpg jpe jps mpo
Commercial name : JPEG
Internet media type : image/jpeg
File size : 7106737
File size : 6.78 MiB
File size : 7 MiB
File size : 6.8 MiB
File size : 6.78 MiB
File size : 6.778 MiB
Stream size : 0
Stream size : 0.00 Byte (0%)
Stream size : Byte0
Stream size : 0.0 Byte
Stream size : 0.00 Byte
Stream size : 0.000 Byte
Stream size : 0.00 Byte (0%)
Proportion of this stream : 0.00000
File last modification date : 2024-11-26 10:31:28 UTC
File last modification date (local) : <redacted>
Image
Count : 166
Count of stream of this kind : 1
Kind of stream : Image
Kind of stream : Image
Stream identifier : 0
Format : JPEG
Format : JPEG
Commercial name : JPEG
Internet media type : image/jpeg
Width : 8160
Width : 8 160 pixels
Height : 6120
Height : 6 120 pixels
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Compression mode : Lossy
Compression mode : Lossy
Stream size : 7106737
Stream size : 6.78 MiB (100%)
Stream size : 7 MiB
Stream size : 6.8 MiB
Stream size : 6.78 MiB
Stream size : 6.778 MiB
Stream size : 6.78 MiB (100%)
Proportion of this stream : 1.00000
What I’ve Tried
I have tried the following:
- Disable, remove, install
previewgenerator
-app - Empty
oc_filecache
- Various
preview_
settings - Removing
preview
-folder indata
-path, which is re-created when running aocc preview
command - Running
preview:pre-generate
andpreview:generate-all
more times than I can count by now - Restarting
httpd
andphp-fpm
many times - Running
occ files:scan
mutliple times - Running
occ files:scan-app-data
multiple times - SELinux both Enforced and Permissive
There is only one (1) config
-file present in /etc/nextcloud
(my config location), which is config.php
.File a094c5b2-8c5d-1036-9667-c78a89139def/files/Photos/bobtest/radioaktiv_2_3.png not found
root@nextcloud-1:/usr/share/nextcloud# sudo -u webServer1apache php /usr/share/nextcloud/occ preview:generate a094c5b2-8c5d-1036-9667-c78a89139def/files/bobtest/radioaktiv_2_3.png -vvvv
No preview generator available for file of typeimage/png
root@nextcloud-1:/usr/share/nextcloud# sudo -u webServer1apache php /usr/share/nextcloud/occ preview:generate a094c5b2-8c5d-1036-9667-c78a89139def/files/bobtest/noun-spanner-6553900.png -vvvv
No preview generator available for file of typeimage/png
root@nextcloud-1:/usr/share/nextcloud# sudo -u webServer1apache php /usr/share/nextcloud/occ preview:generate a094c5b2-8c5d-1036-9667-c78a89139def/files/bobtest/noun-spanner-6553900.BMP -vvvv
No preview generator available for file of typeimage/bmp
I have honestly no idea what I am missing here and any help is appreciated. Oh yeah, there are no thumbnails/previews showing in neither browser nor app either.
Br
UPDATE: I just tested with .png
and .bmp
but none of those work either and fails with the same error as .jpg/jpeg
.