404 on image previews (only jpg)

,

Steps to reproduce

  1. Upload a JPG file
  2. Open the image in the web interface

Expected behaviour

Be able to see the image

Actual behaviour

A “broken image” icon is shown

Server configuration

Operating system: Debian 10

Web server: Apache2 in a docker container behind a nginx proxy

Database: PostgreSQL 13.2

PHP version: PHP 7.3.27

ownCloud version: 10.9.1.2

Updated from an older ownCloud or fresh install: Updated from 10.6.0.5 (which had the same issue)

Where did you install ownCloud from: Downloaded from owncloud.com

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'oc7sdph4i3tc',
  'passwordsalt' => {removed},
  'secret' => {removed},
  'trusted_domains' =>
  array (
    0 => 'owncloud.babelruins.org',
  ),
  'datadirectory' => '/var/www/owncloud_data',
  'overwrite.cli.url' => 'https://owncloud.babelruins.org/',
  'dbtype' => 'pgsql',
  'version' => '10.9.1.2',
  'dbname' => {removed},
  'dbhost' => 'postgres-13',
  'dbtableprefix' => 'oc_',
  'dbuser' => {removed},
  'dbpassword' => {removed},
  'logtimezone' => 'UTC',
  'installed' => true,
  'debug' => false,
  'loglevel' => 1,
  'maintenance' => false,
  'theme' => '',
  'allow_user_to_change_mail_address' => '',
);

List of activated apps:

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Enabled:
  - activity:
    - Version: 2.7.0
    - Path: /var/www/owncloud/apps/activity
  - comments:
    - Version: 0.3.0
    - Path: /var/www/owncloud/apps/comments
  - configreport:
    - Version: 0.2.0
    - Path: /var/www/owncloud/apps/configreport
  - dav:
    - Version: 0.7.0
    - Path: /var/www/owncloud/apps/dav
  - 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.5.2
    - Path: /var/www/owncloud/apps/files
  - files_external:
    - Version: 0.8.0
    - Path: /var/www/owncloud/apps/files_external
  - files_mediaviewer:
    - Version: 1.0.5
    - Path: /var/www/owncloud/apps/files_mediaviewer
  - files_pdfviewer:
    - Version: 1.0.1
    - Path: /var/www/owncloud/apps/files_pdfviewer
  - files_sharing:
    - Version: 0.14.0
    - Path: /var/www/owncloud/apps/files_sharing
  - files_texteditor:
    - Version: 2.4.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.2.0
    - Path: /var/www/owncloud/apps/firstrunwizard
  - market:
    - Version: 0.6.3
    - Path: /var/www/owncloud/apps/market
  - notifications:
    - Version: 0.5.4
    - Path: /var/www/owncloud/apps/notifications
  - onlyoffice:
    - Version: 7.3.3
    - Path: /var/www/owncloud/apps/onlyoffice
  - provisioning_api:
    - Version: 0.5.0
    - Path: /var/www/owncloud/apps/provisioning_api
  - systemtags:
    - Version: 0.3.0
    - Path: /var/www/owncloud/apps/systemtags
  - templateeditor:
    - Version: 0.4.0
    - Path: /var/www/owncloud/apps/templateeditor
  - updatenotification:
    - Version: 0.2.1
    - Path: /var/www/owncloud/apps/updatenotification
Disabled:
  - admin_audit:
    - Path: /var/www/owncloud/apps/admin_audit
  - announcementcenter:
    - Path: /var/www/owncloud/apps/announcementcenter
  - customgroups:
    - Path: /var/www/owncloud/apps/customgroups
  - encryption:
    - Path: /var/www/owncloud/apps/encryption
  - enterprise_key:
    - Path: /var/www/owncloud/apps/enterprise_key
  - external:
    - Path: /var/www/owncloud/apps/external
  - files_antivirus:
    - Path: /var/www/owncloud/apps/files_antivirus
  - files_classifier:
    - Path: /var/www/owncloud/apps/files_classifier
  - files_external_dropbox:
    - Path: /var/www/owncloud/apps/files_external_dropbox
  - files_external_ftp:
    - Path: /var/www/owncloud/apps/files_external_ftp
  - files_ldap_home:
    - Path: /var/www/owncloud/apps/files_ldap_home
  - files_lifecycle:
    - Path: /var/www/owncloud/apps/files_lifecycle
  - firewall:
    - Path: /var/www/owncloud/apps/firewall
  - gallery:
    - Path: /var/www/owncloud/apps/gallery
  - graphapi:
    - Path: /var/www/owncloud/apps/graphapi
  - guests:
    - Path: /var/www/owncloud/apps/guests
  - metrics:
    - Path: /var/www/owncloud/apps/metrics
  - oauth2:
    - Path: /var/www/owncloud/apps/oauth2
  - openidconnect:
    - Path: /var/www/owncloud/apps/openidconnect
  - password_policy:
    - Path: /var/www/owncloud/apps/password_policy
  - ransomware_protection:
    - Path: /var/www/owncloud/apps/ransomware_protection
  - sharepoint:
    - Path: /var/www/owncloud/apps/sharepoint
  - systemtags_management:
    - Path: /var/www/owncloud/apps/systemtags_management
  - theme-enterprise:
    - Path: /var/www/owncloud/apps/theme-enterprise
  - user_external:
    - Path: /var/www/owncloud/apps/user_external
  - user_ldap:
    - Path: /var/www/owncloud/apps/user_ldap
  - user_shibboleth:
    - Path: /var/www/owncloud/apps/user_shibboleth
  - web:
    - Path: /var/www/owncloud/apps/web
  - windows_network_drive:
    - Path: /var/www/owncloud/apps/windows_network_drive
  - wopi:
    - Path: /var/www/owncloud/apps/wopi
  - workflow:
    - Path: /var/www/owncloud/apps/workflow

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Chrome 100.0.4896.75

Operating system: Windows 10

Logs

Web server error log

172.20.0.2 - carloswaldo [19/Apr/2022:23:03:13 +0000] "GET /ocs/v1.php/cloud/capabilities?format=json HTTP/1.1" 200 2788 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:03:13 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - carloswaldo [19/Apr/2022:23:03:14 +0000] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 860 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:03:14 +0000] "GET /remote.php/dav/avatars/carloswaldo/128.png HTTP/1.1" 404 716 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:03:17 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - carloswaldo [19/Apr/2022:23:03:19 +0000] "PROPFIND /remote.php/dav/files/carloswaldo/ HTTP/1.1" 207 926 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:03:43 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:03:47 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - carloswaldo [19/Apr/2022:23:03:59 +0000] "PROPFIND /remote.php/dav/files/carloswaldo/ HTTP/1.1" 207 926 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:04:13 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:04:17 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - carloswaldo [19/Apr/2022:23:04:39 +0000] "PROPFIND /remote.php/dav/files/carloswaldo/ HTTP/1.1" 207 926 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:04:44 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:04:47 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:04:56 +0000] "POST /index.php/heartbeat HTTP/1.1" 200 673 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:05:13 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - - [19/Apr/2022:23:05:17 +0000] "GET /status.php HTTP/1.1" 200 853 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:17 +0000] "PROPFIND /remote.php/dav/files/carloswaldo/ HTTP/1.1" 207 946 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:17 +0000] "GET /ocs/v1.php/cloud/capabilities?format=json HTTP/1.1" 200 2788 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - - [19/Apr/2022:23:05:17 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:18 +0000] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 860 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:18 +0000] "GET /remote.php/dav/avatars/carloswaldo/128.png HTTP/1.1" 404 716 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:19 +0000] "PROPFIND /remote.php/dav/files/carloswaldo/ HTTP/1.1" 207 926 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.20.0.2 - carloswaldo [19/Apr/2022:23:05:20 +0000] "GET /ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 840 "-" "Mozilla/5.0 (Windows) mirall/2.10.1 (build 7187) (ownCloud, windows-10.0.19044 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

ownCloud log (data/owncloud.log)

{"reqId":"uQkx2qQbjZpoYbGyVTMO","level":0,"time":"2022-04-19T22:42:23+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/slideshow","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"uQkx2qQbjZpoYbGyVTMO","level":0,"time":"2022-04-19T22:42:23+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/slideshow","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"uQkx2qQbjZpoYbGyVTMO","level":0,"time":"2022-04-19T22:42:23+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/slideshow","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"core","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"Generating preview for \"\/carloswaldo\/files\/Im\u00e1genes\/Avatares\/24831210_10155754416550446_8311002345332320966_o.jpg\" with \"OC\\Preview\\JPEG\""}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"core","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"OC_Image->loadFromFile, could not load"}
{"reqId":"OOKasn0kv0vBkI4hJtgd","level":0,"time":"2022-04-19T22:42:24+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"core","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/58129?width=2000&height=2000&c=3ecb27235dd4d31bd9e7db430e0ea14d&requesttoken=MBV5MC4mYCFBFT80XSYVPWwRAAUgcXBZeREfUz0yFAY%3D%3AjyOyCjPc%2FQsnhtAvXsVfm95nIpz0ZCca0nDTwlim4pI%3D","message":"OC_Image->fixOrientation() Orientation: -1"}
{"reqId":"KszGLHxUkb9Dbm1K4cME","level":0,"time":"2022-04-19T22:42:25+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"KszGLHxUkb9Dbm1K4cME","level":0,"time":"2022-04-19T22:42:25+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"menpzl0INJTqTLZ8Ei9j","level":0,"time":"2022-04-19T22:42:31+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"POST","url":"\/index.php\/settings\/admin\/log\/level","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"menpzl0INJTqTLZ8Ei9j","level":0,"time":"2022-04-19T22:42:31+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"POST","url":"\/index.php\/settings\/admin\/log\/level","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"menpzl0INJTqTLZ8Ei9j","level":0,"time":"2022-04-19T22:42:31+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"POST","url":"\/index.php\/settings\/admin\/log\/level","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}
{"reqId":"menpzl0INJTqTLZ8Ei9j","level":0,"time":"2022-04-19T22:42:31+00:00","remoteAddr":"172.20.0.2","user":"carloswaldo","app":"OC\\User\\Session::validateToken","method":"POST","url":"\/index.php\/settings\/admin\/log\/level","message":"token 38baee5c82f147d09a50ba26f5c7cd65789fd0bedd94d8696a0cfc16162774c0dd5341c722f739cf6dc41462ac3a108f420087c5e17f76289831cd5779605753 with token id 14900 found, validating"}

Browser log

24831210_10155754416550446_8311002345332320966_o.jpg:1          GET https://owncloud.babelruins.org/remote.php/dav/files/carloswaldo/Im%C3%A1genes/Avatares/24831210_10155754416550446_8311002345332320966_o.jpg?c=3ecb27235dd4d31bd9e7db430e0ea14d&x=1280&y=1280&a=1&preview=1 404
GET https://owncloud.babelruins.org/remote.php/dav/files/carloswaldo/Im%C3%A1genes/Avatares/avatar.jpg?c=edbab056b5a5c5a2787942089729e144&x=1280&y=1280&a=1&preview=1 404
GET https://owncloud.babelruins.org/remote.php/dav/files/carloswaldo/Im%C3%A1genes/Avatares/d05867d7038c877f42ba675e054a3a0e.jpeg?
AAEAAQAAAAAAAAXhAAAAJDAxZDU5MmIxLTgyNjgtNDQ4OC1hODk0LTIyZGI0Mzk1YjkxMw.jpg:1          GET https://owncloud.babelruins.org/remote.php/dav/files/carloswaldo/Im%C3%A1genes/Avatares/AAEAAQAAAAAAAAXhAAAAJDAxZDU5MmIxLTgyNjgtNDQ4OC1hODk0LTIyZGI0Mzk1YjkxMw.jpg?c=137e117689f553c7f9cf75045f06b699&x=1280&y=1280&a=1&preview=1 404

This doesn’t happen with other images like PNG, also the JPG files are there since I can download them, I just can’t see them on the web interface.

Double-check the file format (don’t trust it’s a jpg just by the extension), and also check that the file isn’t corrupted somehow.
The last option is that you have a php version without support for jpg in the GD extension, but that would be weird.

3 Likes

Yes! That was it!

For reference, I’m using the “php:7.3-apache” docker image. With your hint I searched how to get gd info and did this inside the container:

root@bb931fb98833:/var/www/html# php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] =>
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] =>
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] =>
    [XBM Support] => 1
    [WebP Support] =>
    [BMP Support] => 1
    [JIS-mapped Japanese Font Support] =>
)

So yeah, no JPEG support. I had to:

apt install libjpeg62-turbo-dev
docker-php-ext-configure gd --with-jpeg-dir
docker-php-ext-install gd

And now everything is working like a charm. Thank you very much!

P.D.: What I didn’t like about this issue is I had no idea how to start debugging. No errors shown by php or apache and I had to set the owncloud log to max. verbosity only to get the ambiguous message “could not load”.

2 Likes

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