Issue Feature Closed

#50075Responsive Image Rendering

Ingo Schmitt 07/16/13, 15:19 updated 10/14/13, 14:39

Description

Result of the Workshop “Implementing Reponsive Images Rendering” from the TYPO3 Developer Days 2013 in Hamburg:

See also: https://notes.typo3.org/p/t3dd_rwd

Currently TYPO3 renders an image hard coded as HTML IMG Tag. The result is:

<img src="src" alt="alt" title="title" width="" height="" border="">

When implementing a responsive website a different approach is needed to render Images:

  • Without any width and height attribute
<img src="small.jpg" data-medium="medium.jpg" data-1="1.jpg" ... alt=".." />
  • Without any width and height attribute and with srcset attribute
<img src="1.jpg" srcset="1.jpg, 2.jpg 800w" alt="foo" />
  • With picture Tag
<picture alt="Description of image subject.">
        <source src="small.jpg">
        <source media="(min-width: 18em)" src="med.jpg">
        <source media="(min-width: 45em)" src="large.jpg">
        <source media="(min-width: 45em) AND (min-resolution: 192dpi)" src="large_highres.jpg">
        <img src="small.jpg" alt="Description of image subject.">
</picture>
  • With no script Tag
<noscript data-large="Koala.jpg"
          data-small="Koala-small.jpg"
          data-small-highres="Koala.jpg"
          data-alt="Koala">
  <img src="Koala.jpg" alt="Koala" />
</noscript>

The idea of the workshop is to update the rendering to have it fully configurable by TYPO Script to have the opportunity to change the rendering in future if new tags could be introduced by the W3C.

A solution was setup in the workshop as Patch https://review.typo3.org/#/c/22052/ including a test-Extension which xclasses the core to have the possibility to change the TS Rendering until the complete patch is in the core.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.