Project

General

Profile

Actions

Feature #50075

closed

Responsive Image Rendering

Added by Ingo Schmitt almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2013-07-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

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.


Files


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #49723: Improve rendering of responsive imagesClosed2013-07-06

Actions
Related to TYPO3 Core - Feature #51842: Allow to remove dimensions in img tagClosed2013-09-09

Actions
Actions

Also available in: Atom PDF