Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 1.1.5

No permission to buy ($29.00)

zTurko

New Member
I have these errors:


Code:
ErrorException: Mismatched result files. $expectedFiles=1 $actualFiles=0 src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('Mismatched resu...', false)
#1 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(95): XF::logError('Mismatched resu...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#3 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
and this:

Code:
ErrorException: [tl] Image Optimizer: Seem failed to execute command. $command=/usr/bin/gifsicle --colors='256' --lossy='50' --no-names --output '/home/xxxxxx/public_html/internal_data/temp/xfPMVs6G' '/home/xxxxx/public_html/internal_data/temp/xfW30czL' $output=array ( ) src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(53): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(142): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/streamwe6...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(83): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Truonglv

Staff member
Tech Support
I have these errors:


Code:
ErrorException: Mismatched result files. $expectedFiles=1 $actualFiles=0 src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('Mismatched resu...', false)
#1 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(95): XF::logError('Mismatched resu...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#3 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
and this:

Code:
ErrorException: [tl] Image Optimizer: Seem failed to execute command. $command=/usr/bin/gifsicle --colors='256' --lossy='50' --no-names --output '/home/xxxxxx/public_html/internal_data/temp/xfPMVs6G' '/home/xxxxx/public_html/internal_data/temp/xfW30czL' $output=array ( ) src/XF/Error.php:75
Generated by: Unknown account 9 Dec 2018 at 00:10
Stack trace
#0 src/XF.php(189): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(53): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(142): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/streamwe6...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(83): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'image_proxy', Object(XF\Timer), 5468)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(21) "https://xxxxxxx.fr/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
That mean cannot optimize that image.
 

nrep

New Member
I've got a suggestion that would really help me. I'm happy to optimise images uploaded to the forums, but I don't want to optimise images added to the resource manager. Is it possible to add an option to exclude attachments that meet "content_type" matches? For example, a textbox where I could exclude "resource_update", "resource_version" etc...
 

Tealk

Member
I high recommend you use the following guide to made the job run as scheduled.
https://xenforo.com/community/resources/trigger-deferred-php-via-shell-crontab.2512/
Hi,
can you explain to me what that means? Because this is a tutorial for XF1, what does it have to look like for xf2?


And when I upload a PNG to the gallery I get this error message:
Code:
Server error log

    ErrorException: [tl] Image Optimizer: Failed to optimize image. $path=/pathToXF/internal_data/temp/xf6m3n5S, $command=/usr/bin/gifsicle --colors='256' --lossy='80' --no-names --output '/pathToXF/internal_data/temp/xfmXS5SM' '/pathToXF/internal_data/temp/xf6m3n5S' $output=array ( ) $newSize=0 src/XF/Error.php:75

    Generated by: Unknown account Apr 9, 2019 at 3:30 PM

Stack trace

#0 src/XF.php(187): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(55): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(143): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/var/customers/...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(85): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...', Object(Truonglv\ImageOptimizer\ContentData\AttachmentData))
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(52): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 93)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:

Tealk

Member
Could you please explain the following to me in more detail?
Code:
Resize image algo
        Resize to exact dimensions
        Resize and crop center
        Resize to short edge dimensions (like: Attachment thumbnail)
 

Truonglv

Staff member
Tech Support
Resize to exact dimensions: Resize image to exact dimension which your image may not strange.
Resize and crop center: Scale image and crop at center. Which will remove a part of your image.
Resize to short edge dimensions: Like XenForo attachment thumbnail do.
 
View previous replies…

mmurguia

New Member
Sorry - I don't get it.

Resize to exact dimensions: "Resize image to exact dimension which your image may not strange." What does this mean?
"Resize to short edge dimensions: Like XenForo attachment thumbnail do." How does this do?
 

Bonsai Coder

New Member
No response probably due to time zone.... so I thought I'd post the options so you might highlight something I am doing wrong:

3200

3201
 

Truonglv

Staff member
Tech Support
Do you have any server errors log?
 

Bonsai Coder

New Member
Only a few.... 89 of these "failed to optimize" errors over the course of the night. 100's of files processed.

Code:
     ErrorException: [tl] Image Optimizer: Failed to optimize image. $path=/home/bonsainu/public_html/internal_data/temp/xfJcUBC7, $command= --colors='256' --lossy='80' --no-names --output '/home/bonsainu/public_html/internal_data/temp/xfPy2sjh' '/home/bonsainu/public_html/internal_data/temp/xfJcUBC7' $output=array ( ) $newSize=0 src/XF/Error.php:75
Code:
     ErrorException: [tl] Image Optimizer: Failed to optimize image. $path=/home/bonsainu/public_html/internal_data/temp/xfCwZkPJ, $command= -f --quality '60-80' --speed '5' --output '/home/bonsainu/public_html/internal_data/temp/xf3EA75Y' '/home/bonsainu/public_html/internal_data/temp/xfCwZkPJ' $output=array ( ) $newSize=0 src/XF/Error.php:75
 
Top