JPG images not showing on NextCloud Hub 3

As in this topic, my images are not showing. I started at php7.4, but have migrated to php8.1.

Stock packages should work, but no images are showing, even during file selection.

I’ve addressed the php changes in the following files:

NextCloud 25.0.4
Ubuntu 20.04


What php extensions do you have installed?

dpkg -l | grep php

What does the output of phpinfo(); show?

What does your Nginx log file show when loading images?

php-common/now all [installed,local]
php-pear/now all [installed,local]
php8.1-bcmath/now amd64 [installed,local]
php8.1-cli/now amd64 [installed,local]
php8.1-common/now amd64 [installed,local]
php8.1-curl/now amd64 [installed,local]
php8.1-dev/now amd64 [installed,local]
php8.1-fpm/now amd64 [installed,local]
php8.1-gd/now amd64 [installed,local]
php8.1-gmp/now amd64 [installed,local]
php8.1-igbinary/now amd64 [installed,local]
php8.1-imagick/now amd64 [installed,local]
php8.1-intl/now amd64 [installed,local]
php8.1-mbstring/now amd64 [installed,local]
php8.1-mysql/now amd64 [installed,local]
php8.1-opcache/now amd64 [installed,local]
php8.1-pgsql/now amd64 [installed,local]
php8.1-readline/now amd64 [installed,local]
php8.1-sqlite3/now amd64 [installed,local]
php8.1-xml/now amd64 [installed,local]
php8.1-zip/now amd64 [installed,local]
php8.1/now all [installed,local]
pkg-php-tools/focal,focal,now 1.38 all [installed,automatic]

PHP information as reported by NextCloud:

Version: 8.1.13

Memory limit: 512 MB

Max execution time: 10000

Upload max size: 16 GB

Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, intl, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, exif, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache