Shared images not embedding on discord anymore | No size reported back with request

Nextcloud version (eg, 20.0.5): 24.0.7
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.5
PHP version (eg, 7.4): 8.0

The issue you are facing:

When sharing an image with the /preview URL, no size is being sent in the response anymore.

I cant even tell when this has started to happen, tbh. Here is an example link to see for yourself: https://cloud.cynthialabs.net/s/gSN43LgX6iKBxNX/preview. The reason I even noticed is because I use ShareX to upload images to my cloud and then embed these on Discord, which now just fails after over a year of using it like that. I barely touch the server anymore, because I don’t want to mess with a well-running system. So there’s no tampering that could have caused this. I also don’t believe it was an app-update as the last one done was about a week ago (caught me there, I’m a bit late)

Here is an image, from a different Cloud I do not own, that embeds just fine: https://cloud.disroot.org/s/RSZgiiS4AmpicEF/preview

Is this the first time you’ve seen this error? (Y/N):
Y

Steps to replicate it:

  1. If I knew that, I wouldn’t be here

The output of your Nextcloud log in Admin > Logging:

Clear. No errors

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'meow',
  'passwordsalt' => 'meow',
  'secret' => 'meow',
  'trusted_domains' =>
  array (
    0 => 'meow',
  ),
  'allow_local_remote_servers' => true,
  'datadirectory' => '/var/www/nextcloud-data/',
  'dbtype' => 'mysql',
  'version' => '24.0.7.1',
  'overwrite.cli.url' => 'meow',
  'dbname' => 'meow',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'meow',
  'dbpassword' => 'meow',
  'installed' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'htaccess.RewriteBase' => '/',
  'default_phone_region' => 'DE',
  'auth.webauthn.enabled' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\Movie',
    2 => 'OC\\Preview\\TXT',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\MKV',
    5 => 'OC\\Preview\\MP4',
    6 => 'OC\\Preview\\AVI',
  )

The output of your Apache/nginx/system log in /var/log/____:

Just like admin logs, no errors indicating such an issue.

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Only one relevant note:

{"reqId":"Y254nhf0k9yxAhF9taQmnwAAAB0","level":1,"time":"2022-11-11T16:30:22+00:00","remoteAddr":"172.71.30.8","user":"--","app":"no app in context","method":"GET","url":"/s/tnBDd6XAkcTrLFB/preview","message":"Deprecated event type for OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)","version":"24.0.7.1","data":[]}
{"reqId":"Y254nhf0k9yxAhF9taQmnwAAAB0","level":0,"time":"2022-11-11T16:30:22+00:00","remoteAddr":"172.71.30.8","user":"--","app":"core","method":"GET","url":"/s/tnBDd6XAkcTrLFB/preview","message":"OC_Image->fixOrientation() Image is not a JPEG.","userAgent":"Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)","version":"24.0.7.1","data":{"app":"core"}}
{"reqId":"Y254nhf0k9yxAhF9taQmnwAAAB0","level":0,"time":"2022-11-11T16:30:22+00:00","remoteAddr":"172.71.30.8","user":"--","app":"core","method":"GET","url":"/s/tnBDd6XAkcTrLFB/preview","message":"OC_Image->fixOrientation() Orientation: -1","userAgent":"Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)","version":"24.0.7.1","data":{"app":"core"}}

when a preview is accessed

The same goes for every media on discord. My Clouds logo doesnt embed anymore either. I can bypass it with using /download/filename.png however that’s just an ugly URL

Any help would be greatly appreciated.