If all files inside fileadmin/_processed_ are deleted and a CKeditor instance with relations to fileadmin/_processed_ is saved, all newly created proessed images have a width of 300. This means, the tsconfig settings are ignored.
The reason for this can be found in rte-ckeditor-image/Classes/Database/RteImagesDbHook.php line 289:
So if we pass non existent values to typo3/cms-core/Classes/Resource/Service/MagicImageService.php->setMagicImageMaximumDimensions(), all images will be created with the default magicImageMaximumWidth of 300 (see class variables in MagicImageService.php)
Steps to reproduce
Delete all files inside fileadmin/_processed', open a CKeditor with magic images and click save. Now they will be recreated but they will all have a width of max 300
Expected behavior
Create images with the maxWidth and maxHeigth values configured in page.tsconfig
Environment
TYPO3 version: 12.4.15
PHP version: 8.1, 8.2, 8.3
Extension version: 12.0.2
Documentation
Have you checked the readme/documentation?
Bug description
In page.tsconfig we can set the default maxWidth and maxHeight for magic images like this:
If all files inside
fileadmin/_processed_
are deleted and a CKeditor instance with relations tofileadmin/_processed_
is saved, all newly created proessed images have a width of 300. This means, the tsconfig settings are ignored.The reason for this can be found in rte-ckeditor-image/Classes/Database/RteImagesDbHook.php line 289:
$magicImageService->setMagicImageMaximumDimensions($pageTsConfig['TCEFORM.']['RTE.']['default.'] ?? []);
The path in the array
$pageTsConfig['TCEFORM.']['RTE.']['default.']
does not exist, it should be$pageTsConfig['RTE.']['default.']
(remove TCEFORM). See https://docs.typo3.org/p/friendsoftypo3/rtehtmlarea/main/en-us/Configuration/PageTsconfig/interfaceConfiguration/Index.html#buttons-image-options-magic-maxwidthSo if we pass non existent values to typo3/cms-core/Classes/Resource/Service/MagicImageService.php->setMagicImageMaximumDimensions(), all images will be created with the default magicImageMaximumWidth of 300 (see class variables in MagicImageService.php)
Steps to reproduce Delete all files inside
fileadmin/_processed'
, open a CKeditor with magic images and click save. Now they will be recreated but they will all have a width of max 300Expected behavior Create images with the maxWidth and maxHeigth values configured in page.tsconfig
Environment
Documentation Have you checked the readme/documentation?