webcoast-dk/deferred-image-processing

TYPO3 12

Opened this issue · 12 comments

What are the plans for TYPO3 12?
Is there already a schedule when deferred_image_processing for TYPO3 12 will be available?

@fritzdacat I guess with the feature freeze of 12.3 it would be a good time now. Unfortunately I don't have a v12 project yet. I start the next project (with v12) in a few weeks. I should be able to use it there.

@xerc
Please check in your fork in Classes/Resource/Processing/DeferredImageProcessor.php in line 91-92. the variable should be names "$imageDimension" instead "$imageDimensions"

xerc commented

fix & maybee also this .. ?!

diff --git a/Classes/Resource/Processing/DeferredImageProcessor.php
@@ -27,6 +27,8 @@ class DeferredImageProcessor extends LocalImageProcessor
             && $task->getSourceFile()->getProperty('height') > 0
             && $task->getSourceFile()->getMimeType() !== 'image/svg+xml'
             && $task->getSourceFile()->getMimeType() !== 'application/pdf'
+            && !($GLOBALS['TSFE']->config['config']['tx_headless.']['staticTemplate'] ?? false)
+            && !($GLOBALS['TYPO3_REQUEST']->getAttribute('site')->getConfiguration()['headless'] ?? false)
         ;
     }

Thanks for fix the variable name.
Can't say what impact these lines will have because i don't have a headless instance. Maybe this should be configurable.

Additonially i found another problem in the DeferredImageProcessor.php, line 75-84.
There is a check if the dimensions of the original and target file are the same and the original file will taken. I run into a problem here when i change the file extension (e.g. jpeg to webp). The dimension are the same but the file extension is different and i get the original image. A check for changed file extension is required.

And the verbose argument in the cli command needs to be removed. In TYPO3 v12 vendor/bin/typo3cms doesn't exists anymore and the cli can be executed by using vendor/bin/typo3 and it looks like a verbose arguments exists by default

xerc commented

not tested ; xerc@af185c0

xerc commented

you may shall check out helhum/typo3-console

@xerc
I have the typo3-console installed but with v8 it changed. see doc https://github.com/TYPO3-Console/TYPO3-Console

xerc commented

would be easier if you could specify - how to change - and give detailed links on how to use this argument within - thx

I only removed the registration of the verbos argument in Classes/Command/ProcessCommand.php to make it work again.

xerc commented

I only removed the registration of the verbos argument in Classes/Command/ProcessCommand.php

you may please create a push-req. @ my branch

how can we use the /typo3 --verbose mode?