Bug #89741

Insert Image in CKEditor is always set after saving to width = 300 px in workspace version - news record only

Added by Ralf Thietz 11 months ago. Updated 5 months ago.

Should have
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
CKEditor Image Workspace
Is Regression:
Sprint Focus:


Typo3 9.5.11 / Workspaces 9.5.11 / news 7.3.1

We use typo3 with the news extension. The problem occurs only in the workspace "Stage". The problem does not exist in the "live" version and with normal text elements on a page.

RTE configuration:

--- [magic]
---- [maxWidth] = 1200
---- [maxHeight] = 900

Problem Description

1. Call up the news record
2. Insert picture via the CKEditor (HD resolution)
3. picture is inserted with the width 1200px
4. Save record
5. After saving, the image will again be 300 px wide (only in news "stage" version).

In the workspace, the value is not overwritten when saving and set to the value of 300PX in the code.

Extension news, field, bodytext '.

$ imageButtonConfiguration in class TYPO3 \ CMS \ Core \ Resource \ Service \ MagicImageService is an empty array with preset = 'default'

Therefore the value of the property $ magicImageMaximumWidth is alywas = 300.

Repeating the process in Live Workspace does not cause the problem.

    / *
Set maximum dimensions of magic images based on RTE configuration
     * @param array $ rteConfiguration: RTE configuration probably coming from PageTSConfig
     * /
    public function setMagicImageMaximumDimensions (array $ rteConfiguration)
        // Get maximum dimensions from the configuration of the RTE image button
        $ imageButtonConfiguration = (is_array ($ rteConfiguration ['buttons.']) && is_array ($ rteConfiguration ['buttons.'] ['image.']))? $ rteConfiguration ['buttons.'] ['image.']: [];
        if (is_array ($ imageButtonConfiguration ['options.']) && is_array ($ imageButtonConfiguration ['options.'] ['magic.']))) {
            if ((int) $ imageButtonConfiguration ['options.'] ['magic.'] ['maxWidth']> 0) {
                $ this-> magicImageMaximumWidth = (int) $ imageButtonConfiguration ['options.'] ['magic.'] ['maxWidth'];
            if ((int) $ imageButtonConfiguration ['options.'] ['magic.'] ['maxHeight']> 0) {
                $ this-> magicImageMaximumHeight = (int) $ imageButtonConfiguration ['options.'] ['magic.'] ['maxHeight'];


#1 Updated by Ralf Thietz 11 months ago

  • PHP Version changed from 7.3 to 7.2
  • Complexity changed from hard to medium

#2 Updated by Riccardo De Contardi 10 months ago

Am I totally wrong, or there should'nt even be the possibility to add an image using the CKEditor? At least, without using EXT:rte_ckeditor_image ?

The PHP code reported here is maybe some legacy old code?

#3 Updated by Benni Mack 5 months ago

  • Status changed from New to Closed

That is correct, we don't provide such a solution in EXT:core, and the code was actually removed in TYPO3 v10. So this needs to be handled in the respective extension.

Also available in: Atom PDF