Erik
Erik

Reputation: 108

How to process image width/height in TYPO3?

I built a website in plain html/css with my own design. Now I need to put this website in TYPO3 CMS 9.5.4. Unfortunately it's my first time working with TYPO3 and I don't really know what I'm doing.

What I got so far:

Most of the website is already working fine. I included fluid_styled_content and my setup basically looks like this:

page = PAGE
page.1 = FLUIDTEMPLATE
page.1 {
  file = fileadmin/sitedesign/Resources/Private/Templates/Page.html
  variables {
    content < styles.content.get
  }
}

The Page.html file is basically my whole html template and I put

{content->f:format.raw()}

where I want my content.

All content I create in the backend is displayed as I want except of images.

My question:

I can display images by creating a "Text & Images" content element and adding the images in the "Images" tab. In the "Media Adjustments" section I can now set the width and height of each element and below I can choose the number of columns.

However these do not change anything in the source code of my website i.e. in the content variable, so all images are displayed in full size.

What can I do to make the width/height appear in the source code (ideally as width/height attribute of that element)?

Upvotes: 5

Views: 2782

Answers (1)

Paul Beck
Paul Beck

Reputation: 2685

Hey Erik and welcome to TYPO3. Usually TYPO3 will take care of the correct images sizes when using the default Content Elements (e.g. Text & Images). But TYPO3 requires ImageMagick or GraphicsMagick installed on the server to modify the pictures. You can check out if your system matches all requirements using the "Environment" module in the TYPO3 backend (modules on the left side of the backend). Then you will see a function called "Image processing" which will test the required image functions of your server.

Upvotes: 4

Related Questions