Dalton Prock
Well-known member
I've added it to our issue tracker, thank you for the report!
I've added it to our issue tracker, thank you for the report!
Optimize Pre-existing Images
To optimize pre-existing images, navigate to ACP → Tools → Data maintenance → Rebuild caches → Optimize images. You can then choose which content type you want to optimize: (All), Attachments, Proxied images, or User avatars. You can also set how many items are optimized per page.
Allow me to check with our team on this and I will get back to you!Can I run this on CLI mode? using php cmp.php.
Thanks.
php cmd.php xf-rebuild:thimageopt-optimize-existing-image
, and optionally pass through a content type with --type
(for example --type=attachment
- by default will do all).They usually aren't compatible.Is anyone here also using AndyB Convert Image addon with this TH Addon?
Convert image
Premium upgrade: This XF2 add-on along with the entire collection can be purchased for $35.00 USD. Your Premium upgrade will allow you to download as many XF2 add-ons as you like for one year. Please see the entire collection located in the...xenforo.com
That is different addon and works with older embed only.I'm using 'Convert image all 4.1' with no issues.
'Convert Image all' is run manually rather than on the fly as posts are made.That is different addon and works with older embed only.
Curious why you didn't use this also?
Convert image
Premium upgrade: This XF2 add-on along with the entire collection can be purchased for $35.00 USD. Your Premium upgrade will allow you to download as many XF2 add-ons as you like for one year. Please see the entire collection located in the...xenforo.com
Sorry I'm a bit off topic, just want to make sure before purchasing the addon.
'Convert Image all' is run manually rather than on the fly as posts are made.
'Convert Image' is run automatically on the fly as posts are made
In a busy forum where we get 700-1000 posts a day, I'd rather run the add-on once a month manually than have it running automatically
However, I'm getting confused now as the TH Optimiser will optimise images either on the fly or via a cron so what happens to images that have been posted then 'converted' later, would the Optimiser pick them up or not?
Also, a question I asked a while back does the TH Optimiser keep copies of the images prior to optimising them as well as the optimised images?
I would suspect not but did notice a sharp drop in available drive space after installing it and running it for the first time.
Any hint for possible mis configuration?otherwise you can mess up with your images,
You should play with percentage and set it right.Hi Dalton I let you know that also disabling the avatars images compression, the plugin continue to compress those avatar images, loosing also more quality of the images that became really unviewable.
Then I'm using Jpegoptim e Pngquant but the compression loose more quality and is not good. Is there some other good and free solution?
Depends entirely on how Andy has implemented the conversion. If he's used the native XenForo attachment code, then image optimizer will be able to pick it up and optimize it. No guarantee though.However, I'm getting confused now as the TH Optimiser will optimise images either on the fly or via a cron so what happens to images that have been posted then 'converted' later, would the Optimiser pick them up or not?
The first thing I told is a bug. About the second, I have test it also with 90% of quality but the compression always loose visible qualityYou should play with percentage and set it right.
ErrorException: [E_NOTICE] stream_copy_to_stream(): write of 8192 bytes failed with errno=14 Bad address src/XF/Util/File.php:167
Generated by: Unknown account Mar 10, 2021 at 11:28 AM
Stack trace
#0 [internal function]: XF::handlePhpError(8, '[E_NOTICE] stre...', '/home/nadda/pub...', 167, Array)
#1 src/XF/Util/File.php(167): stream_copy_to_stream(Resource id #12, Resource id #13)
#2 src/XF/Util/File.php(176): XF\Util\File::copyStreamToTempFile(Resource id #12, true)
#3 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/ImageProxy.php(142): XF\Util\File::copyAbstractedPathToTempFile('internal-data:/...')
#4 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/AbstractHandler.php(85): ThemeHouse\ImageOptimizer\ContentHandler\ImageProxy->standardizeEntityForStatus(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy))
#5 src/addons/ThemeHouse/ImageOptimizer/ImageOptimizer.php(95): ThemeHouse\ImageOptimizer\ContentHandler\AbstractHandler->isEntityOptimized(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy))
#6 src/addons/ThemeHouse/ImageOptimizer/ImageOptimizer.php(53): ThemeHouse\ImageOptimizer\ImageOptimizer->isEntityOptimized('th_imageopt_ima...', Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy))
#7 src/addons/ThemeHouse/ImageOptimizer/XF/Service/ImageProxy.php(22): ThemeHouse\ImageOptimizer\ImageOptimizer::optimize('th_imageopt_ima...', Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy))
#8 src/XF/Service/ImageProxy.php(94): ThemeHouse\ImageOptimizer\XF\Service\ImageProxy->finalizeFromFetchResults(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy), Array)
#9 src/XF/Service/ImageProxy.php(47): XF\Service\ImageProxy->fetchNewImage('https://nirjonm...')
#10 src/XF/Proxy/Controller.php(120): XF\Service\ImageProxy->getImage('https://nirjonm...')
#11 proxy.php(34): XF\Proxy\Controller->outputImage('https://nirjonm...', 'a4650c0f6f8074f...')
#12 {main}
Request state
array(4) {
["url"] => string(144) "/proxy.php?image=https%3A%2F%2Fmysite.net%2Fimages%2F2021%2F02%2F26%2FTegan_Summers_Lexy_Simms_174.jpg&hash=a4650c0f6f8074ff63561b986ce1dc50"
["referrer"] => string(84) "/threads/littlemut-lexy_simms_and_tegan_summers_1.83417/page-8"
["_GET"] => array(2) {
["image"] => string(73) "/images/2021/02/26/Tegan_Summers_Lexy_Simms_174.jpg"
["hash"] => string(32) "a4650c0f6f8074ff63561b986ce1dc50"
}
["_POST"] => array(0) {
}
}
This seems to be a PHP issue rather than the addon itself, after searching it sounds like the@mattrogowski @Lukas W. Getting lot of Server error log:
Code:ErrorException: [E_NOTICE] stream_copy_to_stream(): write of 8192 bytes failed with errno=14 Bad address src/XF/Util/File.php:167 Generated by: Unknown account Mar 10, 2021 at 11:28 AM Stack trace #0 [internal function]: XF::handlePhpError(8, '[E_NOTICE] stre...', '/home/nadda/pub...', 167, Array) #1 src/XF/Util/File.php(167): stream_copy_to_stream(Resource id #12, Resource id #13) #2 src/XF/Util/File.php(176): XF\Util\File::copyStreamToTempFile(Resource id #12, true) #3 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/ImageProxy.php(142): XF\Util\File::copyAbstractedPathToTempFile('internal-data:/...') #4 src/addons/ThemeHouse/ImageOptimizer/ContentHandler/AbstractHandler.php(85): ThemeHouse\ImageOptimizer\ContentHandler\ImageProxy->standardizeEntityForStatus(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy)) #5 src/addons/ThemeHouse/ImageOptimizer/ImageOptimizer.php(95): ThemeHouse\ImageOptimizer\ContentHandler\AbstractHandler->isEntityOptimized(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy)) #6 src/addons/ThemeHouse/ImageOptimizer/ImageOptimizer.php(53): ThemeHouse\ImageOptimizer\ImageOptimizer->isEntityOptimized('th_imageopt_ima...', Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy)) #7 src/addons/ThemeHouse/ImageOptimizer/XF/Service/ImageProxy.php(22): ThemeHouse\ImageOptimizer\ImageOptimizer::optimize('th_imageopt_ima...', Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy)) #8 src/XF/Service/ImageProxy.php(94): ThemeHouse\ImageOptimizer\XF\Service\ImageProxy->finalizeFromFetchResults(Object(ThemeHouse\ImageOptimizer\XF\Entity\ImageProxy), Array) #9 src/XF/Service/ImageProxy.php(47): XF\Service\ImageProxy->fetchNewImage('https://nirjonm...') #10 src/XF/Proxy/Controller.php(120): XF\Service\ImageProxy->getImage('https://nirjonm...') #11 proxy.php(34): XF\Proxy\Controller->outputImage('https://nirjonm...', 'a4650c0f6f8074f...') #12 {main} Request state array(4) { ["url"] => string(144) "/proxy.php?image=https%3A%2F%2Fmysite.net%2Fimages%2F2021%2F02%2F26%2FTegan_Summers_Lexy_Simms_174.jpg&hash=a4650c0f6f8074ff63561b986ce1dc50" ["referrer"] => string(84) "/threads/littlemut-lexy_simms_and_tegan_summers_1.83417/page-8" ["_GET"] => array(2) { ["image"] => string(73) "/images/2021/02/26/Tegan_Summers_Lexy_Simms_174.jpg" ["hash"] => string(32) "a4650c0f6f8074ff63561b986ce1dc50" } ["_POST"] => array(0) { } }
upload_max_filesize
PHP setting may need to be increased. Sources here and here.This seems to be a PHP issue rather than the addon itself, after searching it sounds like theupload_max_filesize
PHP setting may need to be increased. Sources here and here.
Also found a PHP bug report from a while back but says it's fixed on Windows, if you're running a Windows server.
We use essential cookies to make this site work, and optional cookies to enhance your experience.