XF 2.0 Resize image based on image file size? (Not just dimensions)

BobHarbison

Active member
Is it possible to force XF to downsize an image based on the total image size? I have a member who like to upload 800 x 1000 images that are about 1MB each. I want to have them be around 250K, not 1MB.

Yes, I know, I can set a max file size of, say 400K, but that would mean they get rejected and he has to resize them.

I don't want to set the image size to be less that 1000 pixels, so I can't have it trigger it that way.

Essentially, what I'm asking for is a way to tell Xenforo "Accept images over 500K for uploading, but then downsize them to 500K even if they don't exceed the pixel dimensions" Is that asking to much of the software?
 
No, their is nothing in the core like that, you can read Chris' explanation here.

I understand what he says but I'd still like to see this feature added. The images aren't huge. They're 1 MB, and 800 x 1000 (he must think I'm printing them on metal or something...) I don't want the dimensions smaller, but I want the file size to be 1/4 of what it is.

Maybe the software could be tricked into re-sizing it to the original dimensions if they don't exceed the settings and compress it in the process?
 
I understand what he says but I'd still like to see this feature added. The images aren't huge. They're 1 MB, and 800 x 1000 (he must think I'm printing them on metal or something...) I don't want the dimensions smaller, but I want the file size to be 1/4 of what it is.

Maybe the software could be tricked into re-sizing it to the original dimensions if they don't exceed the settings and compress it in the process?

Then you would have to start a suggestion since the one I linked to was closed due to lack of interest. Also that suggestion was only for the media gallery.
 
That might work. Do you have a link to one you recommend?
Neither one I use, so I can't give a recommendation.
What I would do is to ask in their resource thread my questions and be sure that those addons do the job you want them to do BEFORE you buy the product. That is a general tip, not just this time cause usually most addons don't get features after they are published. So be sure before you buy, that those addons do your job.
Here are those 2 optimizers I was talking about, but can't say how they work:
https://xenforo.com/community/threads/th-image-optimizer-paid.135602/
https://xenforo.com/community/threads/tl-image-optimizer-for-xf-2-x-paid.140261/
 
Image Optimizer looked promising until I saw the fine print about needing a membership in some other website with a monthly fee. I don't have the budget for more fees, I'm trying reduce the ones I have now.
 
Image Optimizer looked promising until I saw the fine print about needing a membership in some other website with a monthly fee. I don't have the budget for more fees, I'm trying reduce the ones I have now.
I understand, I agree and that sucks. Again, I have never used one so didn't know you need a subscription in another site. Well, then the only hope is the other one.
 
Thanks, I'll keep an eye on that one. Based on years of experience, I don't install version 1.0.x of anything, LOL! :)
You can always copy your database and files, put them in localhost (e.g. XAMPP) and test stuff and when you feel fine, you can use the addons on live. You can also create a new xf installation on localhost and upload some test images, if your own database/forum size is very big to bother with. Just a general tip.
 
You can always copy your database and files, put them in localhost (e.g. XAMPP) and test stuff and when you feel fine, you can use the addons on live.

That's pretty much what my gardening website is. I've got two large forums I'll be migrating once I have everything fine tuned and working the way I like it. But there are only so many hours in the day, and I've got other things to fine tune, so I've set image size to 1200, and I'm hoping that Mr 800 x 1000 x 1 MB is an anomaly.

At some point in the future I'll look into re-suggesting that, it would sure be nice if folks could take photo from their phone, upload them and the forum would shrink them to a decent file size and resolution, no matter what dimension they are.
 
  • Like
Reactions: sbj
Back
Top Bottom