|
11 | 11 |
|
12 | 12 | use Cloudinary\Asset\Image; |
13 | 13 | use Cloudinary\Transformation\ImageTransformation; |
14 | | -use Cloudinary\Transformation\Scale; |
15 | 14 | use Exception; |
16 | 15 | use TYPO3\CMS\Core\Resource\StorageRepository; |
17 | 16 | use TYPO3\CMS\Core\Resource\File; |
@@ -53,10 +52,11 @@ public function getExplicitData(File $file, array $options): array |
53 | 52 | if (isset($apiOptions['responsive_breakpoints']['transformation'])) { |
54 | 53 | // Check if we need to scale the image down, before applying image transformations |
55 | 54 | $prescaleTransformation = $this->getPrescaleTransformation($file); |
56 | | - $apiOptions['responsive_breakpoints']['transformation'] = array_map( |
57 | | - fn(array $parameters) => (new ImageTransformation($prescaleTransformation))->addActionFromQualifiers($parameters), |
58 | | - $apiOptions['responsive_breakpoints']['transformation'], |
59 | | - ); |
| 55 | + $transformation = new ImageTransformation($prescaleTransformation); |
| 56 | + foreach($apiOptions['responsive_breakpoints']['transformation'] as $parameters) { |
| 57 | + $transformation->addActionFromQualifiers($parameters); |
| 58 | + } |
| 59 | + $apiOptions['responsive_breakpoints']['transformation'] = $transformation; |
60 | 60 | } |
61 | 61 |
|
62 | 62 | try { |
@@ -165,10 +165,10 @@ public function generateOptionsFromSettings(array $settings, bool $enableRespons |
165 | 165 | ) { |
166 | 166 | $transformations[] = [ |
167 | 167 | 'crop' => 'crop', |
168 | | - 'width' => $settings['width'], |
169 | | - 'height' => $settings['height'], |
170 | | - 'x' => $settings['x'], |
171 | | - 'y' => $settings['y'], |
| 168 | + 'width' => (int)$settings['width'], |
| 169 | + 'height' => (int)$settings['height'], |
| 170 | + 'x' => (int)$settings['x'], |
| 171 | + 'y' => (int)$settings['y'], |
172 | 172 | ]; |
173 | 173 | } |
174 | 174 |
|
|
0 commit comments