[TYPO3-english] 6.2beta3 tt_content responsive images, can't get it working

Stefan Reichelt eichelt at web.de
Tue Dec 24 09:55:51 CET 2013


Hello everyone,

I wanted to try out the new responsive stuff in css_styled_content and
content elements with a few images of various dimensions, but just can't
get it to work. Heres the sourceCollection I tried:
tt_content.image.20.1.layoutKey = data
tt_content.image.20.1.sourceCollection >
tt_content.image.20.1.sourceCollection {
      small {
        width = 240
        dataKey = small
      }
      mobile {
        width = 480
        dataKey = mobile
      }
      tablet {
        width = 720
        dataKey = tablet
      }
      display {
        width = 960
        dataKey = display
      }
}

--
Sadly on each generated img-tag the data-arguments get the same
temporary file set and all get set to the same width (unless the
original file is smaller than that width, then the original is used,
also on all arguments).
--

After some looking into it I found this width is set by some maxW
property (CssStyledContentController.php:658) which depends on some
column width which in turn is determined by some calcuations with
various other widths and the field imagecols.

However, this maxW is only set when equalH is not used, so I tried:
tt_content.image.20.equalH >
tt_content.image.20.equalH = 200
And this partly worked. It creates different files for each argument
with the correct widths but all obviously with the same height...

There is probably more to it but I'm to lazy to look deeper into it now.
So yeah, what am I doing wrong and/or how can I get it to work?


Happy holidays everyone,
thanks in advance and
kind regards
Stefan

PS: As a sitenote: If pixelDensity is used in a source alongside the
others above, it creates a different file with the given density for
that source but still only a multiplication of that maxW...


More information about the TYPO3-english mailing list