Image files corrupted

Background:
The Nextcloud package is installed, using an archive file, on a shared hosting server with some folders connected to S3 buckets for external storage, with server-side encryption enabled.
Nextcloud version: 18.0.4 18.0.6 => 18.0.7
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache 2.4.29
PHP version: 7.4.3

The issue you are facing:

Thumbnails of image files do not show within certain folders on the web interface; opening the files resulted in an error identical to the screenshot provided by the OP except for the obvious change in the file name shown. Tried to resolve issue by changing the name of the S3 bucket that contains the affected files on the external storage configuration page, then reverting to the correct name of the S3 bucket. Attempted to circumvent the issue while at NC 18.0.4 by using a WebDAV connection on Nautilus without success: generic image file icons were shown in lieu of thumbnails of images within the files manager window; a pop-up message resulted from double-clicking any of the icons with a message suggesting that the file is corrupted, an image viewer window also appears with a banner indicating an “Error opening [path to filename]”

Is this the first time you’ve seen this error? N

The output of your Nextcloud log in Admin > Logging:

PHP Errors [47 instances for 20 image files] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144

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

<?php
$CONFIG = array (
  'instanceid' => 'ocnssr8i2s5s',
  'passwordsalt' => 'unsalted',
  'secret' => 'notso',
  'trusted_domains' =>
  array (
    0 => 'domain.tld',
  ),
  'datadirectory' => '/home/ssh-user/domain.tld/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.7.1',
  'overwrite.cli.url' => 'https://domain.tld/nextcloud',
  'dbname' => 'honeysuckle_squirt',
  'dbhost' => 'mysql.server.sticky-hosting.com',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'meee',
  'dbpassword' => 'pass12345',
  'installed' => true,
  'maintenance' => false,
);

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

PASTE HERE

Update

Background:
The Nextcloud package is installed, using an archive file, on a shared hosting server with some folders connected to S3 buckets for external storage, with server-side encryption enabled.
Nextcloud version: 18.0.4, 18.0.6 => 18.0.7
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache 2.4.29
PHP version: 7.4.3

The issue you are facing:

Thumbnails of image files do not show within certain folders on the web interface; opening the files resulted in an error identical to the screenshot provided by the OP of a related thread except for the obvious change in the file name shown. Tried to resolve issue by changing the name of the S3 bucket that contains the affected files on the external storage configuration page, then reverting to the correct name of the S3 bucket. Attempted to circumvent the issue while at NC 18.0.4 by using a WebDAV connection on Nautilus without success: generic image file icons were shown in lieu of thumbnails of images within the files manager window; from double-clicking any of the icons, an image viewer window appeared with the banner message:

Could not load image “[file name]”.
Fatal error reading PNG image file: Not a PNG file

Is this the first time you’ve seen this error? N

The output of your Nextcloud log in Admin > Logging:

PHP Errors [47 instances for 20 image files] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144

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

<?php
$CONFIG = array (
  'instanceid' => 'ocnssr8i2s5s',
  'passwordsalt' => 'unsalted',
  'secret' => 'notso',
  'trusted_domains' =>
  array (
    0 => 'domain.tld',
  ),
  'datadirectory' => '/home/ssh-user/domain.tld/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.7.1',
  'overwrite.cli.url' => 'https://domain.tld/nextcloud',
  'dbname' => 'honeysuckle_squirt',
  'dbhost' => 'mysql.server.sticky-hosting.com',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'meee',
  'dbpassword' => 'pass12345',
  'installed' => true,
  'maintenance' => false,
);

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

PASTE HERE