87567[BUGFIX] Ensure AVIF files are only written when format is supported
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Stefan Bürk +1
- Sebastian Iffland +1
- Benni Mack +1
-
Verified V +2 Done
- Garvin Hicking +2
- Stefan Bürk +1
- Oliver Hader +1
- Benni Mack +1
- core-ci +1 CI
Issues 3
Files 5
- typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php5+27 −4
- typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php+11 −0
- typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php+8 −1
- typo3/sysext/fluid/Tests/Functional/Fixtures/ViewHelpers/ImageViewHelper/Folders/fileadmin/ImageViewHelperFailTest.tifnewbinary
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/ImageViewHelperTest.php+49 −0
Review log 1923
-
Garvin Hicking uploaded patch set 1 12/19/24, 09:08
-
core-ci voted on patch set 1 V -1 12/19/24, 09:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71436
-
Garvin Hicking uploaded patch set 2
V -112/19/24, 09:17 -
core-ci voted on patch set 2 V +1 12/19/24, 09:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71437
-
Sebastian Iffland commented on patch set 2 12/19/24, 09:30
-
Garvin Hicking commented on patch set 2 12/19/24, 09:51
GraphicalFunctions.php:353ReplyThank you for reading/checking this intensively. In this case, the DefaultConfiguration sets imagefile_ext to contain 'avif' actually, and should be evaluated to enhance `$this->imageFileExt` in the constructor of GraphicalFunctions. So "this should work, I hope"(tm) ;) -
Sebastian Iffland commented on patch set 2 CR +1 12/19/24, 10:55
GraphicalFunctions.php:353ReplyOK, got it. Indeed that will work in the end if `$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']` was provided with 'avif'. Thanks for clarification! -
Garvin Hicking uploaded patch set 3
CR +1V +112/21/24, 14:24 -
core-ci voted on patch set 3 V +1 12/21/24, 14:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71526
-
Garvin Hicking commented on patch set 3 12/21/24, 14:53
I've updated this patch to fix the bug I noticed. In a follow-up for v14 I would like to streamline this further, especially removing the "gif_or_jpeg" method plus removing the default values in `$imageFileExt` of the class, so that it will become more clear that the TYPO3_CONF_VARS imagefile_ext is the actual source of that array. -
Sebastian Iffland voted on patch set 3 CR +1 01/02/25, 06:26
-
Stefan Bürk commented on patch set 3 CR -1 01/02/25, 11:49
Reviewing ... -
Stefan Bürk uploaded patch set 4
CR +1V +101/02/25, 13:50 -
Stefan Bürk commented on patch set 4 01/02/25, 13:51
Reply
Done -
Stefan Bürk voted on patch set 4 CR +1 V +1 01/02/25, 13:53
-
core-ci voted on patch set 4 V +1 01/02/25, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71827
-
Sebastian Iffland voted on patch set 4 CR +1 01/02/25, 14:39
-
Sebastian Iffland commented on patch set 4 01/02/25, 14:42
Just an idea…GraphicalFunctions.php:350What about direct assign check result to variable? Probably better in reading (IMO). ``` } elseif ($targetFileExtension === 'avif') { // Outside the "web-compatible" case above, we also need to check if a // specific output format can be written. // For now, only AVIF has special support check handling. $useFallback = !$this->avifSupportAvailable(); } ``` -
Garvin Hicking commented on patch set 4 01/02/25, 15:35
GraphicalFunctions.php:350ReplyI see your point, thank you! However I personally find it harder to read to have negated variable assignments. Thats a matter of taste of course, so I hope you won't mind to keep it like the current form maybe? that makes it easier for me to fix bugs in this if I introduced one ;-) -
Benni Mack voted on patch set 4 CR +1 V +1 01/02/25, 16:11
-
Garvin Hicking voted on patch set 4 CR +2 V +2 01/02/25, 16:26
-
Garvin Hicking merged patch set 5 01/02/25, 16:36
-
Oliver Hader voted on patch set 5 V +1 01/02/25, 20:30
GraphicalFunctions.php:353