Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 2.1.8

No permission to buy ($29.00)
Whats the problem here?
when I click verify
Oops! We ran into some problems.
Error: Call to undefined function Truonglv\ImageOptimizer\Repository\exec() in src/addons/Truonglv/ImageOptimizer/Repository/Log.php at line 248
  1. Truonglv\ImageOptimizer\Repository\Log->testBinary() in src/addons/Truonglv/ImageOptimizer/XF/Admin/Controller/Tools.php at line 48
  2. Truonglv\ImageOptimizer\XF\Admin\Controller\Tools->actionIoCheck() in src/XF/Mvc/Dispatcher.php at line 352
  3. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  4. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  5. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  6. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
  7. XF\App->run() in src/XF.php at line 524
  8. XF::runApp() in admin.php at line 13

Stack trace​

#0 src/addons/Truonglv/ImageOptimizer/XF/Admin/Controller/Tools.php(48): Truonglv\ImageOptimizer\Repository\Log->testBinary('/usr/bin/pngqua...', NULL, NULL)
#1 src/XF/Mvc/Dispatcher.php(352): Truonglv\ImageOptimizer\XF\Admin\Controller\Tools->actionIoCheck(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'IoCheck', Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Truonglv\ImageOptimizer\XF\Admin\Controller\Tools), NULL)
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 admin.php(13): XF::runApp('XF\\Admin\\App')
#8 {main}


Request state​

array(4) {
["url"] => string(25) "/admin.php?tools/io-check"
["referrer"] => string(64) "https://mysite.com/admin.php?options/groups/tl_ImageOptimizer/"
["_GET"] => array(1) {
["tools/io-check"] => string(0) ""
}
["_POST"] => array(6) {
["path"] => string(17) "/usr/bin/pngquant"
["type"] => string(30) "options[tl_ImageOptimizer_png]"
["_xfRequestUri"] => string(44) "/admin.php?options/groups/tl_ImageOptimizer/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
I want to purchase this addon but I have forgotten my password on your site and am not receiving the email with the link to provide a new password.
 
On Centos 7
I was getting compile error for pngquant
Code:
The following warnings were emitted during compilation:

warning: rwpng.c: In function ‘rwpng_create_row_pointers’:
warning: rwpng.c:126:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:      for(size_t row = 0; row < height; row++) {
warning:      ^
warning: rwpng.c:126:5: note: use option -std=c99 or -std=gnu99 to compile your code
warning: rwpng.c: In function ‘rwpng_read_image24_libpng’:
warning: rwpng.c:389:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:          for (unsigned int i = 0; i < mainprog_ptr->height; i++) {
warning:          ^
warning: rwpng.c: In function ‘rwpng_write_image8’:
warning: rwpng.c:589:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:      for(unsigned int i = 0; i < mainprog_ptr->num_palette; i++) {
warning:      ^
warning: pngquant.c: In function ‘pngquant_main_internal’:
warning: pngquant.c:343:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:          for(unsigned int i=0; i < pal->count; i++) {
warning:          ^
warning: pngquant.c:343:9: note: use option -std=c99 or -std=gnu99 to compile your code
warning: pngquant.c:364:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:      for(int i=0; i < options->num_files; i++) {
warning:      ^
warning: pngquant.c: In function ‘set_palette’:
warning: pngquant.c:546:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:      for(unsigned int i=0; i < palette->count; i++) {
warning:      ^
warning: pngquant.c: In function ‘prepare_output_image’:
warning: pngquant.c:749:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
warning:      for(size_t row = 0; row < output_image->height; row++) {
warning:      ^

error: failed to run custom build command for `pngquant v3.0.1

I had to modify the build.rs in the rust directory
added
Code:
cc.flag_if_supported("-std=c99");
bellow
Code:
cc.warnings(false);
 
Using Update last run info - i didn't see it execute on those items. Size didn't change

Also is there a way that we can run the optimizer on a rang or id's or just specific id's?

It seems a group of attachments and proxy images were missed - i noted the id numbers that need work.

Also looking at the proxy image cache with file size it looks like a few items were missed that could use an optimizer run.


Another thought on your suggestion. What do you think the best setting for image proxy lifetime is? Since the images can be reduced via this addon - I am thinking of setting to "0" or forever. This way there is no continuity lost in threads if post source goes down.
What's your opinion on this?
 
Last edited:
We have over 650,000 attachments to process. It is currently running with speed 5 and count 20 but it only seems to process 2 or 3 attachments every 5 minutes. What are the maximum safe values? Are there other parameters to improve the speed.

It looks like it will be about 2 years to process the current attachments at this rate.
 
We have over 650,000 attachments to process. It is currently running with speed 5 and count 20 but it only seems to process 2 or 3 attachments every 5 minutes. What are the maximum safe values? Are there other parameters to improve the speed.

It looks like it will be about 2 years to process the current attachments at this rate.

You may get better results by moving your XF cron to the server so it runs on a scheduled cycle.
 
Do you have an example of how the cron command should look like?

Sort of - it will be different for your server/hosting - something like this (but if you're not comfortable or familiar with using command line on your server, maybe give it a miss):

 
@truonglv Can you make this addon compatible with this one?
 
@truonglv Can you make this addon compatible with this one?
What is your issue? Note: This add-on using XF abstracted filesystem.
 
Top Bottom