Image Optimizer for XF 2.0

Image Optimizer for XF 2.0 [Paid] 2.1.8

No permission to buy ($29.00)
It appears to be jpeg images that are being deleted. Which makes me think it's the jpegoptim binary causing it. I've just downloaded the offcial latest version as the one provided is 1.5.1

Code:
./jpegoptim --version
jpegoptim v1.5.1  x86_64-unknown-linux-gnu (Nov  7 2023)
Copyright (C) 1996-2023, Timo Kokkonen

This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistirbute it under certain conditions.
See the GNU General Public License for more details.


libjpeg version: 6b  27-Mar-1998
Copyright (C) 1991-2020 The libjpeg-turbo Project and many others

but the latest is 1.5.5
Code:
# ./jpegoptim --version
jpegoptim v1.5.5  Linux (Aug 10 2023)
Copyright (C) 1996-2023, Timo Kokkonen

This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
See the GNU General Public License for more details.


libjpeg version: 6b  27-Mar-1998
Copyright (C) 1991-2022 The libjpeg-turbo Project and many others


Don't know whether it's of help but I'm using an old version of Image Optimizer (2.0.8) and I've got jpegoptim v.1.4.6 and no bug that I'm aware of.
 
Guessing we are just glossing over this bug report then? I've tested on another site, and I'm seeing the same symptoms (which has a totally different web stack). I've disabled the addon, but was able to replicate it happening.

View attachment 297356
This error when add-on try to get file path from your database. It look likes you have it broken before.
 
This error when add-on try to get file path from your database. It look likes you have it broken before.
How can the database be broken? The file is being deleted from the file system, and the file works and loads before the addon does what it does (and it's only jpeg and not png files).

https://xenforo.com/community/threads/image-optimizer-for-xf-2-0-paid.140261/page-30#post-1663754

Please read the above post I made which details exactly what is happening.

Your addon changes the HASH used on the file, the original is deleted, but the optimised version is never written back to the file system.
 
Last edited:
Seeing this on a 3rd site now:


I've changed it also to optimise on the fly, rather than on cron.
 
I've got an error with the IO-Test.

Code:
LogicException: Failed to optimize image in src/addons/Truonglv/ImageOptimizer/XF/Admin/Controller/Tools.php at line 208

Truonglv\ImageOptimizer\XF\Admin\Controller\Tools->actionIOTest() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 258
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13

I tried the attached image.
 

Attachments

  • IMG_8201.webp
    IMG_8201.webp
    164.2 KB · Views: 5
I installed this today, and let it run.

Got 7 pages of this error and now images aren't displaying across my forum.
View attachment 297552
https://xenforo.com/community/threads/image-optimizer-for-xf-2-0-paid.140261/page-30#post-1663754

Looks like there is something really not quite right with how this is working at the minute, and the fact it's trashing attachments is VERY worrying.
 
We tested this extensively.

Upload the images, and as soon as this addon "optimized" them, they were deleted from the file system. This was happening before the site moved the attachments to R2, and continued once they were on there:

Example:

View attachment 296828

Uploaded images present in R2

View attachment 296825

Addon optimizes the images per the above log extract.

File then missing:

View attachment 296827
Do you use external storage?
 
I do not use external storage and having the same issues as they describe. We have many many many jpg images missing…
 
Just to add to this, I've not seen the issue with 2.1.7 of your addon, but have on 2.1.8. jpegs are impacted, and not PNGs
 
Just to add to this, I've not seen the issue with 2.1.7 of your addon, but have on 2.1.8. jpegs are impacted, and not PNGs
What processor you use for JPEG? jpegoptim or webp? In 2.1.8 we just only support webp. The core still same.
 
I'll try to detail our situation. We are using version 2.1.8, with jpedoptim 1.4.6. We first started running it a few weeks ago, without the webp enabled. When the optimization was complete, I didn't notice any deleted jpgs. Around a week later, I decided to try the webp optimization to further compress the images. This leads up to recently, when I checked this thread and decided to dig deeper. I then noticed LOTS of missing jpg files and disabled the addon.

Is it possible that the addon only deletes jpg files when webp is enabled? Optimization on the fly must be turned off also, for webp to operate, which was turned on the first run. As @truonglv mentioned, the core didn't change in 2.1.8 and 2.1.7 seems fine. That would lead me to believe that the webp feature is the culprit?

I've checked with my host and they have a backup of the attachments folders from before I turned on webp, so is the only solution a restore of those missing files at this point? I've checked the attachment folders for the front end missing images and they're definitely not there...
 
I'll try to detail our situation. We are using version 2.1.8, with jpedoptim 1.4.6. We first started running it a few weeks ago, without the webp enabled. When the optimization was complete, I didn't notice any deleted jpgs. Around a week later, I decided to try the webp optimization to further compress the images. This leads up to recently, when I checked this thread and decided to dig deeper. I then noticed LOTS of missing jpg files and disabled the addon.

Is it possible that the addon only deletes jpg files when webp is enabled? Optimization on the fly must be turned off also, for webp to operate, which was turned on the first run. As @truonglv mentioned, the core didn't change in 2.1.8 and 2.1.7 seems fine. That would lead me to believe that the webp feature is the culprit?

I've checked with my host and they have a backup of the attachments folders from before I turned on webp, so is the only solution a restore of those missing files at this point? I've checked the attachment folders for the front end missing images and they're definitely not there...
and to add to yours, none of the sites I've seen this on have webp enabled.
 
and to add to yours, none of the sites I've seen this on have webp enabled.
Geez, we might be out of luck then, as our host only has backups up until the first run without webp was completed. Might it be possible that the lost files are in a /trash folder somewhere? I've looked, but don't see any images in the .trash. This is outrageous.
 
Top Bottom