Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 2.2.1

PayPal: $29.00
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...
 
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:
In that resource has a reference link to XF2 version.

About the issue. It's warning when failed to optimize some image. Like processor cannot optimize that.
 
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)
 
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.
 
Back
Top