Image Styles broken after update to D10.4

Created on 20 February 2025, about 2 months ago

Problem/Motivation

Posting this here even though I am not sure it is a s3fs related issue, but I would like to have your feedback on this.

We have a website where the public files are stored in a S3 bucket storage (cloudflare).
Up until Drupal 10.3 and sf3s 8.x-3.6 it worked fine.
After upgrading to D10.4 and 8.x-3.7 the image styles generation is broken.
This line here

$success = $image_style->createDerivative($image_uri, $derivative_uri) && $wrapper->waitUntilFileExists($derivative_uri);

fails, as $image_style->createDerivative($image_uri, $derivative_uri) return FALSE.

The root cause seems to be that the image can't be created from the source $image_uri.

The original image is however uploaded to the bucket and previous check with file_exists return TRUE, meaning the streamWrapper correctly did its job.

I don't see any changes in the module between 8.x-3.6 and 8.x-3.7 that could explain this, and couldn't find anything in core as well.

Passing the full url as $image_uri to the $image_style->createDerivative($image_uri, $derivative_uri) works.

Steps to reproduce

  • Update project to D10.4 and sf3s 8.x-3.7
  • Configure project to use s3 for public files
  • Upload an image via a managed_file field by example
  • Original is uploaded but Image Style generation fails

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

3.7

Component

Code

Created by

πŸ‡«πŸ‡·France GuillaumePacilly

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024