首页 文章

FAL图像在RTE中调整大小

提问于
浏览
0

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

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

当我右键单击BE中的图像然后选择“图像属性”时,我看到编辑宽度,高度, Headers 和Alt文本的选项 . Title和Alt文本正确地在FE上渲染,但宽度/高度是原始图像大小 .

例如 . 图像原始大小为2000像素×1000像素,使用图像属性将大小调整为200像素×100像素 . 单击RTE中的“源”按钮显示已正确设置宽度/高度属性 . 但是,单击“保存”和“查看页面”时,BE和FE中将显示原始2000px×1000px

奇怪的是,如果我使用“源”按钮调整图像宽度/高度属性的大小,则可以正确保存 . 但是我的编辑器想要使用Image Properties选择器

任何建议?我正在使用TYPO3版本8.7.10

1 回答

  • 0

    解决:问题是绝对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已更正此问题

相关问题