TYPO3 crops the media files which were added as text & media. How can I disable this? I want that it uses the original file.
It always takes this:
fileadmin/_processed_/c/a/csm_herren2_b3373d24a3.png
Change the fluid template and remove the width and height attributes of the
Or maybe easier change the typoscript constant that define the max size to a higher value styles.content.textmedia.maxW = 600 and styles.content.textmedia.maxWInText = 300.
Related
I have TYPO3 10 and want to render the images in specific dimensions. I have a content element with only images, and these pictures are rendered with the dimension 495px x 331px. How can I change that? I've uploaded a much bigger original picture. The preview images are always in these dimensions. If I click on the image to enlarge it, it shows a much bigger picture.
The content element is a pictures only element with two columns.
When I set one column, the preview pictures are bigger. How is TYPO3 calculating the dimensions of the pictures?
I assume you want to know how to style the default content type "image".
This content type usually renders a gallery view (grid) of images.
First of all you have these options by default:
Selecting "Number of columns: 1" would make the image use a bigger space.
If you want to directly influence the HTML output, here are some pointers:
The default rendering engine of TYPO3 is fluid_styled_content.
Here is a guide how to override templates for a specific content type:
https://docs.typo3.org/c/typo3/cms-fluid-styled-content/10.4/en-us/Configuration/OverridingFluidTemplates/Index.html
That specific content type uses a GalleryProcessor:
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/fluid_styled_content/Configuration/TypoScript/ContentElement/Image.typoscript
It renders this template:
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Image.html
... which uses some partials to render the media.
Media/Gallery sets up the layout for the image grid:
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Gallery.html
Media/Rendering/Image finally renders the image. The value of dimension has been calculated by the GalleryProcessor:
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Rendering/Image.html
Is there a way to get the actual image size (width/height) of a cropped image ("Image manipulation" > [Open Editor]) in a fluid template?
All I can come up with is {image.properties} and width and height. But these are the dimensions of the original resource, not the cropped one. And there is of course an attribute crop which holds all the crop info:
{"default":{"cropArea":{"height":0.6431784107946027,"width":0.608,"x":0.037,"y":0.15592203898050974},"selectedRatio":"NaN","focusArea":null}}
But do I really have to find a way to parse this in fluid (if that's even possible)? Isn't there an official way to calculate the actual dimension of a generated image?
My use case is an image gallery component for which I need to explicitly state the image dimensions.
In TYPO3 Fluid, You can crop image like below. See here
<f:image src="{image ogject}" alt="Landscape" width="100c" height="100c" />
You could use the VHS Media / SizeViewHelper https://fluidtypo3.org/viewhelpers/vhs/master/Media/SizeViewHelper.html
<f:format.bytes><v:media.size path="{f:uri.image(image: mediaElement, width: 600) -> v:format.trim(characters: '/')}" /></f:format.bytes>
I have a problem,
in my RTE I resize images to a certain size, but after saving, they are reset to either width or height of 300. Smaller sizes are kept, only bigger ones are limited.
I know that there exists a maximum size, after some googleing, i found the following:
RTE.default.buttons.image.options.magic.maxWidth = 1000
RTE.default.buttons.image.options.magic.maxHeight= 1000
RTE.default.buttons.image.options.plain.maxWidth = 1000
RTE.default.buttons.image.options.plain.maxHeight= 1000
But also after inserting it to the PageTS, the images are limited to 300px.
Could someone with more Typo3 experience please help me?
Typo3 version is 6.1.7
I used tx_news and it was impossible to get images larger than 300px width.
I did RTE.default.buttons.image.options.magic.maxWidth = 1000 and styles.content.imgtext.maxWInText = 1000.
The problem is the setMagicImageMaximumDimensions in MagicImageService looks only for RTE.buttons.image.options.magic.maxWidth (no default).
So I have to use,
RTE.buttons.image.options.magic.maxWidth = 1000
There are more constants to define the maximal width of images:
Usage:
styles.content.imgtext {
maxW = XXX
maxWInText = YYY
}
You can also manipulate these widths using registers, which is very helpful to set these values to different values per column. The registers are called maxImageWidth and maxImageWidthInText respectively.
I want to write a jasper reports application. It has to arrange an image and a text such that they will be appropriately placed. This is what I want.
I get images and texts from a web service, so I can fetch image size on runtime. If its width is bigger the text should be below, and vice versa. I tried setting width option by a parameter, but it did not work.
How can i do it?
Correct: You cannot set the image width using a parameter.
The quickest solution is probably like this:
Determine what your maximum width is. Then use a 'Print when expression' to display either the picture-next-to-text layout or the picture-above-text layout. Your report will have 2 image elements and 2 text elements, but you'll choose which one to display based on the image size.
An alternative would be to investigate something like Dynamic Jasper. That's a project designed to dynamically generate the .jrxml on the fly, so it has the ability to modify the width similar to what you're describing.
I want to set height of tiny mce depending on the type of element it is initialized for. For example, I want to set height 200px for headings and use mce's default size for for paragraph and ordered and unordered lists. Also, I want to adjust height of the mce instance with the content. Instead of adding vertical scrolls, it should increase with content.
Help APPRECIATED.
For this you need to specify editor_css in the tinimce init.
There you should change the desired values.