[TH] Image Optimizer [Deleted]

Modifying the dimensions of an image isn't really in the scope of what this add-on is meant to do, we can potentially look into this for a separate add-on though if there is demand

Please, consider this as an option to have all images (gallery/attachements and proxy) with the same size. You can make it as optional in the configuration options.
Most of the work is done, just need to resize when reducing the quality.

Do you use the "Optimize images when they're uploaded" option?

Yes i have
 
Do you use the "Optimize images when they're uploaded" option?

Can you please explain what this feature is and how it works? I think this might be exactly what I need.

If I have attachment limit set at 2 Mb and a user attempts to upload a 3.5 Mb photo what will happen? Will the user get an error message or will your add-on resize the file so that it uploads successfully?
 
Can you please explain what this feature is and how it works? I think this might be exactly what I need.

This option only exists in case for some reason the default XenForo cron has troubles running with it, any upload limits are still respected as the upload process happens well before we touch anything. I do want to add in a CLI command to run the rebuild process, and we'll be recommending that over both the built in cron as well as the optimize on upload function.

Also worth noting the optimize on upload function will cause the whole upload process to be quite a bit slower than if you let the cron handle it.
 
This option only exists in case for some reason the default XenForo cron has troubles running with it, any upload limits are still respected as the upload process happens well before we touch anything. I do want to add in a CLI command to run the rebuild process, and we'll be recommending that over both the built in cron as well as the optimize on upload function.

Also worth noting the optimize on upload function will cause the whole upload process to be quite a bit slower than if you let the cron handle it.


In my case I've increased the attachment size limit, but I noticed the upload and load process was slow. I imagine it's a good idea to decrease these file sizes so as not to slow down the website. Basically what I want is for users to be able to easily upload the photos they want even if they're big files, but I don't want my server and website to slow down. How would this add-on achieve what I need? And what would be the optimal settings/configuration? Is there a best file size that preserves quality yet doesn't slow down the system?
 
In my case I've increased the attachment size limit, but I noticed the upload and load process was slow.

If you do any additional manipulation of the image on upload (such as using the option you mentioned earlier to run the optimizer on upload) it will significantly slow down the upload process.

Basically what I want is for users to be able to easily upload the photos they want even if they're big files, but I don't want my server and website to slow down.

If you're using the (default) cron option to optimize images it should only be a few minutes between when the user uploads the image and when it's been optimized.

How would this add-on achieve what I need?

Once a user uploads an image in one of the supported areas (Attachments and avatars) or links to an image with the image proxy enabled within a few minutes the add-on will run the image through the appropriate image optimizer (depending on your settings and how you've configured it) to attempt to reduce the image size. Sometimes it reduces significantly (75% reduction in file size or more) and sometimes it doesn't reduce anything, that really depends on the specific image.

Is there a best file size that preserves quality yet doesn't slow down the system?

Not really, larger file size doesn't always mean the image is better quality, the file size can depend on many factors other than the dimensions of the image itself so it's really just a matter of tweaking it to work with the images your community typically uploads
 
If you do any additional manipulation of the image on upload (such as using the option you mentioned earlier to run the optimizer on upload) it will significantly slow down the upload process.



If you're using the (default) cron option to optimize images it should only be a few minutes between when the user uploads the image and when it's been optimized.



Once a user uploads an image in one of the supported areas (Attachments and avatars) or links to an image with the image proxy enabled within a few minutes the add-on will run the image through the appropriate image optimizer (depending on your settings and how you've configured it) to attempt to reduce the image size. Sometimes it reduces significantly (75% reduction in file size or more) and sometimes it doesn't reduce anything, that really depends on the specific image.



Not really, larger file size doesn't always mean the image is better quality, the file size can depend on many factors other than the dimensions of the image itself so it's really just a matter of tweaking it to work with the images your community typically uploads

I'm trying to use this add-on with the "resmush.it" feature and I'm not finding any settings to "tweak" anything. I also hit "run now" in the cron and then checked the "status queue" and nothing happened, all images were still the same size.

I'm just going to limit uploads to 1Mb and if users want to upload larger photos they can just resize the files themselves before uploading. I don't want to spend hours and hours fumbling around with an add-on that I don't even really need.

Within an hour of installing this add-on I realized I don't even want it and I requested a refund from your support, and I was told they would not "Unfortunately you’ve already downloaded the product, so I’m unable to offer a refund. " I will definitely keep this experience in mind when considering your company's products in the future.
 
Within an hour of installing this add-on I realized I don't even want it and I requested a refund from your support, and I was told they would not "Unfortunately you’ve already downloaded the product, so I’m unable to offer a refund. "
I mean its kinda simple, its a digital product. We have warnings all over the place. We have screenshots, testimonials, descriptions, documentation, videos, warnings messages, reviews, threads and replies, presales tickets, terms and conditions which mention things like this, etc. Our terms request we have time to solve the issue if it is indeed an issue. Not every addon will do everything you want but I mean the addon does what it says. If its not, then we owe you your money back, simple as. Until we see an issue, please try and help us understand the problem so it can work.

It is a disservice to us to simply ask for a refund because you changed your mind and something I don't care to honor as all thats happened is you wasted time for everyone.
 
I mean its kinda simple, its a digital product. We have warnings all over the place. We have screenshots, testimonials, descriptions, documentation, videos, warnings messages, reviews, threads and replies, presales tickets, terms and conditions which mention things like this, etc. Our terms request we have time to solve the issue if it is indeed an issue. Not every addon will do everything you want but I mean the addon does what it says. If its not, then we owe you your money back, simple as. Until we see an issue, please try and help us understand the problem so it can work.

It is a disservice to us to simply ask for a refund because you changed your mind and something I don't care to honor as all thats happened is you wasted time for everyone.

Ok then can you help me? I installed the add-on, followed the instructions to the best of my knowledge, and nothing happened. Maybe I missed something. When I hit "run now" in the cron nothing happened. How do I get this to actually optimize the files using reSmush.it?
 
Ok then can you help me? I installed the add-on, followed the instructions to the best of my knowledge, and nothing happened. Maybe I missed something. When I hit "run now" in the cron nothing happened. How do I get this to actually optimize the files using reSmush.it?

Is the only issue you're having this part?

I'm trying to use this add-on with the "resmush.it" feature and I'm not finding any settings to "tweak" anything. I also hit "run now" in the cron and then checked the "status queue" and nothing happened, all images were still the same size.

If so this is to be expected, the normal cron job won't rebuild old images, it'll only optimize newly uploaded images. If you want to go through and optimize old images you'll need to go to Tools -> Rebuild caches and click "Rebuild now" under "Optimize images". I'd probably recommend creating a backup of both the filesystem and database before running this as it will process all images that have been uploaded using the attachment and avatar system. There are a lot of safeguards in place to prevent things from breaking, but just a good idea to have a backup regardless :)
 
Is the only issue you're having this part?



If so this is to be expected, the normal cron job won't rebuild old images, it'll only optimize newly uploaded images. If you want to go through and optimize old images you'll need to go to Tools -> Rebuild caches and click "Rebuild now" under "Optimize images". I'd probably recommend creating a backup of both the filesystem and database before running this as it will process all images that have been uploaded using the attachment and avatar system. There are a lot of safeguards in place to prevent things from breaking, but just a good idea to have a backup regardless :)

I uploaded a new 5 Mb image. I let the cron run on shedule. Checked status queue, it says "no records matched". Checked attachments, file is still same size, unchanged. I then hit "run now" on image optimize in the cron. Status queue still says "no records matched". File is still same size.
 
I uploaded a new 5 Mb image. I let the cron run on shedule. Checked status queue, it says "no records matched". Checked attachments, file is still same size, unchanged. I then hit "run now" on image optimize in the cron. Status queue still says "no records matched". File is still same size.

Can you create a ticket with admin and cPanel details so we can have a look? Also, is there anything in your error log? There are quite a few things we log there for informational purposes (such as if an image couldn't match to an optimization provider for some reason). Also worth noting that if you only use ReSmush.it they only support images up to 5 MB. If you have other options enabled that would support the image type though, it'll skip ReSmush and use that if the image is over that max size)
 
Can you create a ticket with admin and cPanel details so we can have a look? Also, is there anything in your error log? There are quite a few things we log there for informational purposes (such as if an image couldn't match to an optimization provider for some reason). Also worth noting that if you only use ReSmush.it they only support images up to 5 MB. If you have other options enabled that would support the image type though, it'll skip ReSmush and use that if the image is over that max size)

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

I'd definitely recommend installing jpegoptim and pngquant on your server and configuring these two providers to run before ReSmush, they're both free and open source and you or your host should be able to install them on your server without much trouble. You'll also get much better performance out of installing them locally as there won't be an unnecessary remote connection to optimize the images :)
 
Top Bottom