Closed tpinne closed 2 years ago
Mh, sounds strange. My first instinct would be to delete the image assets cache on your remote server (there's a button in the install tool). You should also check in the install tool if image processing works properly.
Another problem could be that some or all images don't have the correct dimensions stored in sys_file (or is it sys_file_metadata?). In that case image processing could behave in a strange way.
Ok, it seems to be a combination of the servers processing power or configuration or something like that with ridiculously sized PNG images.
The image in question has been a 9.5 MB PNG. Converted to a 800kb JPG with same dimensions works as intended. So as assumed not a problem with the extension. And though your suggestions didn't do the trick it made me try to replace that image.
So thx for helping :)
The following Snippet generates different output on remote server than in local DDEV environment for a 3300x2550px PNG file.
It not only misses some defined srcSet steps. The big deal is that on the remote server there is 3300w option where no cropping is applied and it outputs the original file in all it's megabytes glory 😬
Extension version: 2.1.0
Because it works properly locally I don't think it is directly related to this extension. But hopefully you have more insight knowledge into TYPO3 image generation to point me in the right direction where to look further. Some information about my debugging so far and the environments.
Local (correct) output
Remote (wrong, IMHO) output
The srcset-Array at this point https://github.com/sitegeist/sms-responsive-images/blob/ca61d8f9c66b7801c5fc79726016403e09228739/Classes/Utility/ResponsiveImagesUtility.php#L464 has all correct widths from the given attribute.
But when the loop comes to 1200 and above the
$processedWidth
is always 3300 (original image width) and therefore sets/fileadmin/imos_media/branchen/Fiable-Furniture-Bathroom-dark.png 3300w
for the rest of the iterations. Both environments have[GFX][processor_allowUpscaling] = true
.https://github.com/sitegeist/sms-responsive-images/blob/ca61d8f9c66b7801c5fc79726016403e09228739/Classes/Utility/ResponsiveImagesUtility.php#L492-L499
But if I generate all those variants with
<f:image ... />
each width is correctly scaled and cropped.Local setup
Remote setup