The big advantage that you don't need pay extra fee each months. And the disadvantage that you MUST have an VPS to use this add-on.
Got it. That makes sense, and fortunately I have a dedicated server, so I could make good use of this then.
The big advantage that you don't need pay extra fee each months. And the disadvantage that you MUST have an VPS to use this add-on.
Currently it is support Attachments and Image Proxy only. Avatars have been resized and save low quality so i dont think it is need to compress again.Does this optimize the avatars or other images that isn't attachments?
It is not yet.Hi @truonglv, does this addon resize the cached proxy images to predefined maximum physical dimensions (pixels), or to ones set in the ACP -> Options -> Attachments: Maximum Attachment Image Dimensions?
It is time to replace it by a SSD diskHDD's very fast
Oh yesIt is time to replace it by a SSD disk![]()
Will consider in next releasestruonglv, thank you for your reply. I hope you will add that function to the addon in the future, as the cached images eat up my HDD's very fast.
Does you see any error in sever error logs page?I think it seems like the only problem is that it does not work with XenForo Media Gallery. In this case, the system optimizing has stopped working, attachment_data (#18115) since Friday. I really don't know what happened. Previously, I had thought that XenForo Media Gallery add-on is compatible with the XenForo default attachment system. Isn't that so? Who knows, perhaps, I could be wrong about that.
Notable Changes:
- Added support compress avatars. This feature can be disable in add-on options page.
Does this addon work for conversations and media gallery as well? Or is it just for forum posts/replies?
League\Flysystem\FileNotFoundException: Job Truonglv\ImageOptimizer\Job\Optimizer: File not found at path: avatars/h/1/1024.jpg src/vendor/league/flysystem/src/Filesystem.php:385
Generated by: Unknown account Nov 11, 2018 at 6:15 PM
Stack trace
#0 src/vendor/league/flysystem/src/Filesystem.php(193): League\Flysystem\Filesystem->assertPresent('avatars/h/1/102...')
#1 [internal function]: League\Flysystem\Filesystem->readStream('avatars/h/1/102...', Array)
#2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('parent::readStr...', Array)
#3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array)
#4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array)
#5 [internal function]: League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('avatars/h/1/102...')
#6 src/vendor/league/flysystem/src/MountManager.php(269): call_user_func_array(Array, Array)
#7 src/vendor/league/flysystem/src/MountManager.php(179): League\Flysystem\MountManager->invokePluginOnFilesystem('readStream', Array, 'data')
#8 src/XF/Util/File.php(91): League\Flysystem\MountManager->__call('readStream', Array)
#9 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(106): XF\Util\File::copyAbstractedPathToTempFile('data://avatars/...')
#10 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(69): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('data://avatars/...')
#11 src/XF/Job/Manager.php(241): Truonglv\ImageOptimizer\Job\Optimizer->run(8)
#12 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 8)
#13 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 8)
#14 job.php(14): XF\Job\Manager->runQueue(false, 8)
#15 {main}
Do you have custom avatar sizes? As I see the number of images it is does not matched so you could receive some errors about it.I love the addon thank you! Would love to see it work for media gallery images too.
I just tried the avatar feature and ran into issue:
Code:League\Flysystem\FileNotFoundException: Job Truonglv\ImageOptimizer\Job\Optimizer: File not found at path: avatars/h/1/1024.jpg src/vendor/league/flysystem/src/Filesystem.php:385 Generated by: Unknown account Nov 11, 2018 at 6:15 PM Stack trace #0 src/vendor/league/flysystem/src/Filesystem.php(193): League\Flysystem\Filesystem->assertPresent('avatars/h/1/102...') #1 [internal function]: League\Flysystem\Filesystem->readStream('avatars/h/1/102...', Array) #2 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(431): call_user_func_array('parent::readStr...', Array) #3 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(395): League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod('readStream', Array) #4 src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php(154): League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall('readStream', Array) #5 [internal function]: League\Flysystem\EventableFilesystem\EventableFilesystem->readStream('avatars/h/1/102...') #6 src/vendor/league/flysystem/src/MountManager.php(269): call_user_func_array(Array, Array) #7 src/vendor/league/flysystem/src/MountManager.php(179): League\Flysystem\MountManager->invokePluginOnFilesystem('readStream', Array, 'data') #8 src/XF/Util/File.php(91): League\Flysystem\MountManager->__call('readStream', Array) #9 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(106): XF\Util\File::copyAbstractedPathToTempFile('data://avatars/...') #10 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(69): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('data://avatars/...') #11 src/XF/Job/Manager.php(241): Truonglv\ImageOptimizer\Job\Optimizer->run(8) #12 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 8) #13 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 8) #14 job.php(14): XF\Job\Manager->runQueue(false, 8) #15 {main}
It is looking for avatar image in h directory. There are very few avatars in that directory. I have these directories under avatar:
With the following sizes:
- h
- l
- m
- o
- s
1.7M h
4.0K index.html
42M l
21M m
36M o
16M s
The number of images in each directory:
It looks like the o directory was created when I imported the forum to XF2 and has what I assume is 'original' avatar images.
- h - 17
- o - 2272
- l - 3190
- m - 3187
- s - 3187
There the non-existing images was not processed. Just log into error to let forum owner know and resolve itEdit 2: @truonglv as you can see, if there are no folders, or if a file is deleted, the bypass function solves this issue. So, I mean, you can add a bypass function to skip a deleted file (ID) and folder (X).
We use essential cookies to make this site work, and optional cookies to enhance your experience.