• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on [Paid Mod $250] Allow large images to be uploaded and then resized

John007

Active member
#1
My forums main focus is on photos

but my problem is a lot of users are older and dont understand how to resize images

I want to set the max image upload to 2mb per image

But i want users to be able to upload photos of any file size and the server should resize them down to 2mb per file

My References: Mike (admin here) and Floren Munteanu
So you can be sure i will pay :)
 

Rigel Kentaurus

Well-known member
#3
My forums main focus is on photos

but my problem is a lot of users are older and dont understand how to resize images

I want to set the max image upload to 2mb per image

But i want users to be able to upload photos of any file size and the server should resize them down to 2mb per file

My References: Mike (admin here) and Floren Munteanu
So you can be sure i will pay :)
I just sent you a PM
 

digitalpoint

Well-known member
#4
There is a hard limit that Apache/PHP will enforce via the post_max_size PHP directive (8MB by default), although it's easy enough to change.

The other issue is you aren't going to know what size a photo is in MB until AFTER you resize it since there is no function (that I'm aware of anyway) to resize an image to be a certain file size. Resizing always involves setting new dimensions (not file size). It's not practical to resize something (since it's fairly resource intensive) over and over until the end result is close to 2MB.

Something more realistic would be upload any size (up to whatever you web server allows), then resize it to be no bigger than XXXXpx height or width (which ever is bigger).
 

shawn

Well-known member
#5
Something more realistic would be upload any size (up to whatever you web server allows), then resize it to be no bigger than XXXXpx height or width (which ever is bigger).
And doesn't XF do that by default? I've experimented with it in a test forum. I could upload anything up to 4000px high or wide, and XF would automatically resize it to the dimensions specified in the ACP. Bigger than 4000px, XF would just attach the image as a file.

If anything, I'd argue that the 4000px limit in XF should be admin-configurable, especially since some of us are running our forums on pretty substantial servers that can handle the larger files, and most current cameras are shooting 12mp or 16mp images that are 4288 or 4928 px wide.