Bug #45478
closedResizing a magic image in rte woun't get scaled in frontend
0%
Description
If you insert a magic image in rte and don't touch the image size, you get a downscaled image in frontend.
If you change the size of the image in the rte to a bigger one, the image don't get scaled in frontend, but has the original size.
Updated by Patrick Broens almost 12 years ago
- Complexity set to easy
1) If you insert a magic image in rte and don't touch the image size, you get a downscaled image in frontend.
I did not test this, but isn't the maxWInText setting in the constant editor responsible for this?
2) If you change the size of the image in the rte to a bigger one, the image don't get scaled in frontend, but has the original size.
I think this is the wanted behaviour since you don't want an image to be scaled larger than its original. But I'm not sure.
Updated by Marc Bastian Heinrichs over 11 years ago
Sorry, I described this not exact enough.
The original image e.g. is 3000x2000px.
If you insert a magic image in rte it has a default size, e.g. 600x400px.
If don't touch this default image size, you get a downscaled image (600x400px) in frontend.
If you change the size of the image in the rte to a bigger one, e.g. 900x600px, the image don't get scaled to 900x600px in frontend, but has the original size which is 3000x2000px in this example.
Updated by Ernesto Baschny almost 11 years ago
- Status changed from New to Needs Feedback
- Is Regression set to No
@Ma-Ba, could you please re-check? Thanks!
Updated by Marc Bastian Heinrichs over 10 years ago
- Assignee set to Marc Bastian Heinrichs
Updated by Marc Bastian Heinrichs over 10 years ago
It get scaled now, but it's not possible to get a bigger size than 300px width, also when I raise maxWInText. Will recheck again.
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to New
Updated by Visay Keo over 10 years ago
I'm having the same problem with TYPO3 6.1 and would be good if this could be fixed soon ;-)
Updated by Björn Haverland over 10 years ago
I have had the same problem with Typo3 6.2. There is a default configuration of the max image width ($magicImageMaximumWidth) in the TYPO3\CMS\Core\Resource\Service\MagicImageService with a default value of 300. It is possible to change this value in your PagsTSConfig.
RTE.default {
buttons.image.options.magic.maxWidth = 1000
buttons.image.options.magic.maxHeight = 1000
}
Updated by Patrick Kroog about 10 years ago
It seems, in FrontEnd a wrong configuration array is passed to
TYPO3\CMS\Core\Resource\Service\MagicImageService::setMagicImageMaximumDimensions
So changing "RTE.default.buttons.image.options.magic.maxWidth" works in Backend, but in FrontEnd it defaults to max. 300px width + 1000px height...
For a working solution in FRONT + BACK-end, i need to add this configuration at the moment (TYPO3 6.2.3):
RTE.default.buttons.image.options.magic.maxWidth = 770
RTE.default.buttons.image.options.magic.maxHeight = 2000
RTE.default.buttons.image.options.plain.maxWidth = 770
RTE.default.buttons.image.options.plain.maxHeight = 2000
RTE.buttons.image < RTE.default.buttons.image
Updated by Fabien Udriot almost 10 years ago
I had the same problem and comment above led me to the right direction. Notice, I was loading the TSConfig via the programmatic way in ext_tables.php which was working for images dimension in the backend but not on the frontend. So, I had to revert and includes as "INCLUDE_TYPOSCRIPT" in the page properties.
# Add page TSConfig (which does not work in the context of the FE) $pageTsConfig = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TsConfig/Page/config.ts' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig($pageTsConfig);
UPDATE: It looks this configuration is sufficient buttons.image.options.magic.maxWidth = 600
if set in the Page TSConfig on the page property (in the database). If put as external TSConfig, RTE.buttons.image < RTE.default.buttons.image
was required for me.
Updated by Patrick Kroog almost 10 years ago
Fabien: For me the same problem occurs, if RTE.default.buttons.image is set within the page properties. (TYPO3 6.2.6).
Updated by Mathias Schreiber about 7 years ago
- Status changed from New to Closed
HTMLArea is no longer supported by TYPO3.
You can open up new issues here https://github.com/FriendsOfTYPO3/rtehtmlarea.
Cheers
Mathias