Project

General

Profile

Actions

Feature #102215

open

ViewHelper to generate srcset for responsive images

Added by Simon Praetorius 8 months ago. Updated 4 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-10-20
Due date:
% Done:

0%

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

Description

After some initial HTML standards confusion, srcset/sizes/picture are well-established in the web and are used in a lot of TYPO3 projects nowadays. While there are a few 3rd party extensions out there (I built one of them), I really think that this should be part of the core along the existing ImageViewHelper.

As a first step, I would like to add a new SrcsetViewHelper, which only renders the attribute without any tag. Thus, it is very flexible and can be used:

  • with custom img tags not using the ImageViewHelper
  • with the various options the <picture> tag offers
  • with <link rel="preload" as="image" imagesrcset="..." /> to preload responsive images
  • with the existing ImageViewHelper and additionalAttributes (however I think that this should be integrated in a next step)

I try to keep the ViewHelper API as simple as possible to prevent complexity similar to ImageViewHelper. I would also like to extract the core functionality to a utility class, so that it becomes available to other parts of the core as well as 3rd party extensions.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #57417: ImageViewHelper responsive ImagesClosed2014-03-28

Actions
Related to TYPO3 Core - Feature #27391: Allow multiple formats/resolutions for media-contentClosed2011-06-12

Actions
Actions

Also available in: Atom PDF