Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 2.2.1

PayPal: $29.00
Does this work with PHP 8.1?

I just noticed that it completely stopped working after PHP version update of my server. Even the path verifying says Please enter a valid binary path but the same files are still there and the address has not changed.

Edit: Actually the pngquant and jpegoptim might be missing, I'll look into this.
 
Last edited:
Does this work with PHP 8.1?

I just noticed that it completely stopped working after PHP version update of my server. Even the path verifying says Please enter a valid binary path but the same files are still there and the address has not changed.

Edit: Actually the pngquant and jpegoptim might be missing, I'll look into this.
RadikusGot it working after running setup again, can confirm that it works with PHP 8.1.
 
Hi! Truonglv, why you advised above to run file setup_io.sh or io_setup.sh? I see in addon sources only setup.sh. Addon version is 2.0.8. It's name from old versions or wrong file? Thanks for answer.
 
Hi! Truonglv, why you advised above to run file setup_io.sh or io_setup.sh? I see in addon sources only setup.sh. Addon version is 2.0.8. It's name from old versions or wrong file? Thanks for answer.
topasSorry. setup.sh is correctly file name.
 
Hi Truonglv

I didnt change anything in the forum but I started to get following server error since yesterday. Can you advice what I can do about that?

Code:
Server error log
League\Flysystem\FileNotFoundException: [tl] Image Optimizer: File not found at path: attachments/30/30252-b348caae2cc3d521f9235f13e81981b0.jpg src/vendor/league/flysystem/src/Filesystem.php:389
Generated by: Unknown account 5 Jan 2023 at 19:17
Code:
Stack trace
#0 src/vendor/league/flysystem/src/Filesystem.php(194): League\Flysystem\Filesystem->assertPresent('attachments/30/...')
#1 [internal function]: League\Flysystem\Filesystem->readStream('attachments/30/...', Array)
#2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('League\\Flysyste...', Array)
#3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array)
#4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
#5 src/vendor/league/flysystem/src/MountManager.php(345): League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('attachments/30/...')
#6 src/XF/Util/File.php(190): League\Flysystem\MountManager->readStream('attachments/30/...')
#7 src/addons/Truonglv/ImageOptimizer/ContentData/AttachmentData.php(73): XF\Util\File::copyAbstractedPathToTempFile('data://attachme...')
#8 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(165): Truonglv\ImageOptimizer\ContentData\AttachmentData->onSuccess(Object(XF\Entity\AttachmentData), Array)
#9 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(67): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 30252)
#10 src/XF/Job/Manager.php(260): Truonglv\ImageOptimizer\Job\Optimizer->run(8)
#11 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#12 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#13 job.php(43): XF\Job\Manager->runQueue(false, 8)
#14 {main}
Code:
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(77) "https://www.cevremuhendisleri.net/admin.php?cron/tlImageOptimizer_trigger/run"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Hi Truonglv

I didnt change anything in the forum but I started to get following server error since yesterday. Can you advice what I can do about that?

Code:
Server error log
League\Flysystem\FileNotFoundException: [tl] Image Optimizer: File not found at path: attachments/30/30252-b348caae2cc3d521f9235f13e81981b0.jpg src/vendor/league/flysystem/src/Filesystem.php:389
Generated by: Unknown account 5 Jan 2023 at 19:17
Code:
Stack trace
#0 src/vendor/league/flysystem/src/Filesystem.php(194): League\Flysystem\Filesystem->assertPresent('attachments/30/...')
#1 [internal function]: League\Flysystem\Filesystem->readStream('attachments/30/...', Array)
#2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('League\\Flysyste...', Array)
#3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array)
#4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
#5 src/vendor/league/flysystem/src/MountManager.php(345): League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('attachments/30/...')
#6 src/XF/Util/File.php(190): League\Flysystem\MountManager->readStream('attachments/30/...')
#7 src/addons/Truonglv/ImageOptimizer/ContentData/AttachmentData.php(73): XF\Util\File::copyAbstractedPathToTempFile('data://attachme...')
#8 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(165): Truonglv\ImageOptimizer\ContentData\AttachmentData->onSuccess(Object(XF\Entity\AttachmentData), Array)
#9 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(67): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 30252)
#10 src/XF/Job/Manager.php(260): Truonglv\ImageOptimizer\Job\Optimizer->run(8)
#11 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#12 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#13 job.php(43): XF\Job\Manager->runQueue(false, 8)
#14 {main}
Code:
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(77) "https://www.cevremuhendisleri.net/admin.php?cron/tlImageOptimizer_trigger/run"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
FatihAny idea or action on this? I am still receiving many server error.
 
Truonglv
I'm asking you to release an update that fixes this "[tl] Image Optimizer: File not found at path" error.

Reasons:
1) As topas posted, it may impact the processing of future images.
2) It generates errors (not warnings, errors) in the server error log. Even if the errors are harmless, it should not be generating errors in the log. Some of us, myself included, have an alert system that gives us alerts when any addon is generating errors in the log. I don't like logging in most days to find more errors from this addon in the log.
3) It undermines confidence in the addon to see errors in the log, even if they're harmless.

Ideas:
- Check if the file exists before trying to open it. If it doesn't exist, don't try to open it. This may avoid generating the error.
 
Back
Top