在 RTE 中调整大小的 FAL 图像

FAL image resized in RTE

我已经下载了扩展程序: https://github.com/netresearch/t3x-rte_ckeditor_image/blob/master/README.md

除调整大小外,图像呈现正确。

当我在 BE 中右键单击图像时 select "Image Properties" 我看到了编辑宽度、高度、标题和替代文本的选项。标题和替代文本在 FE 上正确呈现,但 width/height 是原始图像大小。

例如图像原始大小为 2000px x 1000px,使用图像属性将大小调整为 200px x 100px。单击 RTE 中的 "Source" 按钮显示 width/height 属性已正确设置。但是,在单击“保存并查看页面”时,原始 2000px x 1000px 显示在 BE 和 FE

奇怪的是,如果我使用“来源”按钮调整图像 width/height 属性的大小,则会正确保存。但是我的编辑想要使用图像属性 select 或

有什么建议吗?我正在使用 TYPO3 版本 8.7.10

已解决:问题是绝对 URL 不匹配,因此魔术图像转换器在保存图像时使用原始图像尺寸。请参阅 RteHtmlParser.php

之后的第 393 行
if ($absoluteUrl == $originalImageFile->getPublicUrl() || $absoluteUrl == $siteUrl . $originalImageFile->getPublicUrl()) {
   ...
}
else {
    // Magic image case: get a processed file with the requested configuration
    $imageConfiguration = [
        'width' => $imgTagDimensions[0],
        'height' => $imgTagDimensions[1]
    ];
    $magicImage = $magicImageService->createMagicImage($originalImageFile, $imageConfiguration);
    $attribArray['width'] = $magicImage->getProperty('width');
    $attribArray['height'] = $magicImage->getProperty('height');

正在解决文件 URL 更正了这个问题