Preview not generated on encrypted S3

I’ve set a personal NC instance via docker.
I configured a S3 storage (not as primary) with server-side encryption enabled for that S3 storage and i disabled the encryption for the primary one.
Everything is working and well encrypted but it no longer generate previews on the S3 folder.
When it try to start generating preview it generates an error: Error: imagecreatefromstring(): Data is not in a recognized format at /var/www/html/lib/private/legacy/OC_Image.php#758

Previews on local folder work fine.
I also tried to force generating the preview via the preview app but it’s not available with encryption enabled.

Any clues ?