[TH] Image Optimizer [Deleted]

Getting lots of these errors suddenly,

Code:
TypeError: Argument 1 passed to ThemeHouse\ImageOptimizer\ContentHandler\ImageProxy::hasImage() must be an instance of XF\Mvc\Entity\Entity, null given, called in /var/www/vvv/src/addons/ThemeHouse/ImageOptimizer/ContentHandler/AbstractHandler.php on line 43 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/ImageProxy.php:90
Generated by: Unknown account May 29, 2019 at 3:43 PM

Code:
#0 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/AbstractHandler.php(43): ThemeHouse\ImageOptimizer\ContentHandler\ImageProxy->hasImage(NULL)
#1 src/addons/ThemeHouse/ImageOptimizer/Cron/Optimize.php(18): ThemeHouse\ImageOptimizer\ContentHandler\AbstractHandler->optimize(Object(ThemeHouse\ImageOptimizer\Entity\Status))
#2 [internal function]: ThemeHouse\ImageOptimizer\Cron\Optimize::optimizeImages(Object(XF\Entity\CronEntry))
#3 src/XF/Job/Cron.php(34): call_user_func(Array, Object(XF\Entity\CronEntry))
#4 src/XF/Job/Manager.php(253): XF\Job\Cron->run(G)
#5 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#6 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#7 job.php(42): XF\Job\Manager->runQueue(false, 8)
#8 {main}

@Solidus Do you get this error fix? I am also getting lot of same Server error logs.
 
Hi. However I configure the attachment and image optimizer settings Xenforo always tells me that the file is too large. Kraken.io API is active. I want people to be able to upload all images sizes and get it reduced to an optimized size with maximum dimensions of 1200px x 1200px. Can you help me?
 
Hi. However I configure the attachment and image optimizer settings Xenforo always tells me that the file is too large. Kraken.io API is active. I want people to be able to upload all images sizes and get it reduced to an optimized size with maximum dimensions of 1200px x 1200px. Can you help me?

That error isn't related to the image optimizer add-on, that comes directly from XenForo's attachment system. You'll need to make sure XenForo is configured to allow larger attachments to be uploaded
 
That error isn't related to the image optimizer add-on, that comes directly from XenForo's attachment system. You'll need to make sure XenForo is configured to allow larger attachments to be uploaded

Thanks for your answer Jake. What would be the right configuration? Let's say I allow 10MB and 7000x7000px. If a user uploads an image with 7MB and 5000x5000px the image will be compressed with kraken means less kb but it's still 5000x5000px? How can I reduce size at all so in conclusion images will be for example 1200x1200px maximum and optimized with kraken?
 
That isn't something this add-on would be able to do, it only runs it through the listed image optimization services
 
Hi @Jake B.

I got too many error here are that normal ?

  • ErrorException: Unable to find a suitable image optimizer provider for status ID 117. Note: This is most likely not a bug and this message is only generated to notify you of the issue. Details: File size: 82024, Mime type: image/jpeg src/XF/Error.php:75


Here my setting and the version is 1.1.2

1581140308095.png
 
Hello

Is there any documentation or tutorial on installing jpegoptim and Pngquant in a server. After that the best settings (most used) for these providers in the addon options ?

Thanks
 
Hello

Is there any documentation or tutorial on installing jpegoptim and Pngquant in a server. After that the best settings (most used) for these providers in the addon options ?

Thanks
I'd suggest browsing around to see if you might be able to find documentation on installing both of these that fit with your server hardware. I found one here for jpegoptim and one for pngguant here. I'd say it varies on what type of OS or hardware you are running currently. This part of our documentation for Image Optimizer might help with setting them up through your ACP.
 
That isn't something this add-on would be able to do, it only runs it through the listed image optimization services
Hi

Is there a chance that you update this wonderfull add-on in adding the provider OptiPNG
I ask you that because my cloud server gives me the possibility to install it on my server. They have also a tool called Pngcrush

1586670347442.webp 1586670416420.webp

Thank you for the answer !!
 
Hi

Is there a chance that you update this wonderfull add-on in adding the provider OptiPNG
I ask you that because my cloud server gives me the possibility to install it on my server. They have also a tool called Pngcrush

View attachment 222416 View attachment 222417

Thank you for the answer !!
I'll add this as a feature suggestion on our issue tracker although no official ETA of when these will be added. For now keep a watch out for future releases, while waiting I'd suggest researching to see if your server might support our already supported providers.
 
I'll add this as a feature suggestion on our issue tracker although no official ETA of when these will be added. For now keep a watch out for future releases, while waiting I'd suggest researching to see if your server might support our already supported providers.
Good news
My host has installed all your providers in my cloud server !!
 
Getting this error:

Code:
ErrorException: [Image Optimizer] Error received for status ID 542: Pngquant failed to optimize image with response code 126 src/XF/Error.php:75

Pngquant installed in /var/lib/snapd/snap/pngquant/63 dir.
 
Is there a "best" provider choice to be using with this?
ReSmush is free and works very fine
Jpegoptim (for jpeg files) and pngquant (for png files) are also perfect and free but you need to install it on your server
Gifsicle is also free and good for gif files
Since i Used this addon my pagespeed has increase seriously and the size occupied by images in my server is lower than before.
 
Code:
ErrorException: [Image Optimizer] Error received for status ID 3932: Jpegoptim failed to optimize image with response code 127 src/XF/Error.php:75
 
Top Bottom