74926[FEATURE] Add fetchpriority attribute to images
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 7
- typo3/sysext/core/Classes/Imaging/IconProvider/SvgSpriteIconProvider.php+1 −1
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-97765-Image-fetchpriority-attribute.rstnew+36 −0
- typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php+1 −0
- typo3/sysext/fluid/Classes/ViewHelpers/MediaViewHelper.php+4 −0
- typo3/sysext/fluid_styled_content/Configuration/TypoScript/Helper/ContentElement.typoscript+1 −0
- typo3/sysext/fluid_styled_content/Configuration/TypoScript/constants.typoscript+3 −1
- typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Rendering/Image.html+1 −1
Review log 1928
Show 13 earlier messages
-
Gerrit uploaded patch set 1 06/17/22, 13:35
-
core-ci voted on patch set 1 V -1 06/17/22, 13:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28152
-
core-ci commented on patch set 1 06/17/22, 13:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28152
-
core-ci commented on patch set 1 06/17/22, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28152
-
Gerrit abandoned the change 06/17/22, 14:17
missing DOC -
Gerrit restored the change 06/17/22, 17:43
-
Gerrit uploaded patch set 2 06/17/22, 17:55
-
core-ci voted on patch set 2 V -1 06/17/22, 18:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28158
-
Gerrit uploaded patch set 3 06/17/22, 18:04
-
core-ci voted on patch set 3 V +1 06/17/22, 18:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28159
-
Simon Schaufelberger commented on patch set 3 06/17/22, 20:05
can we please make it camelCase? -> fetchPriority -
Gerrit uploaded patch set 4 07/15/22, 15:22
-
Gerrit commented on patch set 4 07/15/22, 15:23
Reply
possible; but also two other "real" image-attr. are lowercase only (ref. https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap | /isMap) -
core-ci voted on patch set 4 V +1 07/15/22, 15:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29230
-
Gerrit uploaded patch set 5 07/18/22, 12:17
-
core-ci voted on patch set 5 V -1 07/18/22, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29331
-
core-ci voted on patch set 5 V +1 07/18/22, 13:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29331
-
Chris Müller commented on patch set 5 07/18/22, 13:57
It is useful to prioritize all images of content elements on a web site either with high or low via the TypoScript constant? As I understand, it should be a thoughful decision by a web developer to set this attribute. -
Simon Schaufelberger wrote 07/18/22, 17:30
Removed cc Simon Schaufelberger. -
Simon Schaufelberger commented on patch set 5 07/18/22, 17:31
Reply
Done -
Simon Schaufelberger wrote 07/18/22, 17:31
Removed cc Simon Schaufelberger. -
Oliver Hader commented on patch set 5 07/19/22, 07:02
Reply
@Simon: Albeit HTML5 allows to use mixed casing - e.g. "fEtCHPRIoriTY" would work - we should stick to the corresponding specs. I suggest to use * `fetchpriority` (lowercase) when used as HTML attribute (→ like in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-fetchpriority) * `fetchPriority` (camelcase) when used as TypoScript or Fluid property (→ like in https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchPriority) -
Oliver Hader commented on patch set 5 07/19/22, 07:03
Reply Unresolved
not resolved yet -
Chris Müller commented on patch set 5 07/27/22, 16:10
Unresolved
I opt for not adding this attribute. The reason is in the MDN docs: "Use it sparingly for exceptional cases where the browser may not be able to infer the best way to load the image automatically. Over use can result in degrading performance." and "The effects of the hint on resource loading is browser-specific so make sure to test on multiple browser engines." https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchpriority If it is really needed, an integrator can use the additionalAttributes parameter in the image view helper after carefully evaluating the pros and cons. And for the default content elements using this attribute does not make sense: Either you set it for all image/media content elements to low or high, or (fictionally) you have to add a field in a content element for an editor to select the value - but the average editor does not have a clue about what fetchPriority means. Also fetchPriority is only implemented by some Chromium browsers by now (Chrome, Edge, but not Opera - and only since some weeks) and also not Firefox. So it is really new and we should wait if it is really necessary to implement it and then come with good use cases. https://caniuse.com/mdn-html_elements_img_fetchpriority -
Benni Mack rebased onto patch set 6
V +103/24/23, 08:27 -
core-ci voted on patch set 6 V -1 03/24/23, 08:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39526
-
Benni Mack commented on patch set 6 CR -1 03/24/23, 13:51
Marcus, can you give some feedback to Chris' comments? I think they raise quite some concerns... Adding the attributes to the ViewHelper is one thing, but adding them to constants is another, I guess. -1 for the time being- -
Benni Mack abandoned the change 07/07/23, 13:20
abandoning this change for the time being, due to lack of feedback. can be restored later