Lack of interest Automatically adjust image file size in combination with width/height

Gladius

Well-known member
#1
Right now, the only option to make image uploads as user-friendly as possible is to set high image width/height dimensions and unlimited file size (MB). However, this does not allow us to control the image size in any way.

Doing it the other way around, setting a fixed file size (MB) and unlimited image dimensions, will reject all attempts at uploading images larger than what's set as the max file size (MB) instead of allowing the larger uploads but resizing the images to whatever is set as the max file size (MB) and leaving the original image dimensions intact.

So what I'd like to see is the option for all the possible image permissions to be respected by the gallery itself automatically and not requiring the users to figure out how to work with the gallery's permissions because that's a) user-unfriendly and b) completely unnecessary.

I somehow managed to not notice this before: "Provide the maximum media file size in megabytes (MB). Media over this size will be rejected." but the bolded bit is really horrible from a usability POV. Rejecting uploads over something that can easily be automated is something that should never happen. When faced with upload fail due to that, how many people will just not bother with resizing their images and skip the upload altogether and/or not even know how to resize their images? Whatever the % is, we could easily avoid it.
 

rickhz

Active member
#2
When faced with upload fail due to that, how many people will just not bother with resizing their images and skip the upload altogether and/or not even know how to resize their images? Whatever the % is, we could easily avoid it.
Having to resize images is a very long standing complaint of forum users. It's definitely something that frustrates the newbies, and those who want to post directly from their megapixel cell phones... which is practically everyone these days.
 

Ernest L. Defoe

Well-known member
#3
I can understand people's frustrations but it's not only forums that resize. Facebook, Twitter and Instagram all do it. Yeah it might not be as noticeable as far as the time it takes on those services but all photos uploaded to them get resized.
 

Gladius

Well-known member
#4
I can understand people's frustrations but it's not only forums that resize. Facebook, Twitter and Instagram all do it. Yeah it might not be as noticeable as far as the time it takes on those services but all photos uploaded to them get resized.
I think that you're missing the point... we're saying XFMG should resize images automatically like Facebook etc., but it doesn't... it REJECTS large images instead of automatically resizing them to the MB size specified by the admin.
 

Chris D

XenForo developer
Staff member
#6
I just want to make something clear, as it isn't clear from @Gladius's posts.

XF will reject images that exceed the max file size, but it will not reject an image that exceeds the maximum width and height. If a maximum width and height is set, the image will be automatically resized. Of course resizing images will reduce the file size too.

The only way to not reject an image which exceeds the maximum file size is for us to guess (or crudely calculate) what to resize the image to. This seems far from ideal, therefore the optimum way of ensuring files do not take up much space.

In the example I just uploaded to this album, the original image (not resized) is over 4MB. The resized image is 261KB.

https://xenforo.com/community/media/albums/test-album.241/

Put simply, if you set a max width and height, you're always going to get a considerably smaller file size images and therefore it is the perfect way of controlling disk space usage.

I'm not sure what you feel is wrong with that concept, but it's a tried and tested approach since XF 1.0 (it works the same for XF attachments).
 

Gladius

Well-known member
#7
Personally, I'm fine with setting a max width and height, but others might not be, depending on their gallery usage. I know now what I can expect MB size-wise after setting a certain max width and height in XFMG, but there's no way for anyone to know that in advance short of trial and error, is there? I haven't seen it specified/adjustable anywhere what settings XFMG uses to resize images over the set dimensions, so I assumed that a very large MP image even when resized could still easily be over 1MB in size. Now if the resizing settings were easily visible, adjustable and explained, this would be a completely different story.
 

Gladius

Well-known member
#8
Put simply, if you set a max width and height, you're always going to get a considerably smaller file size images and therefore it is the perfect way of controlling disk space usage.

I'm not sure what you feel is wrong with that concept, but it's a tried and tested approach since XF 1.0 (it works the same for XF attachments).
A simple illustration of the problem further... one of our users uploaded a few dozen game screenshots. No biggie, right? Standard 1920x1200 res, under the 2000x2000 dimensions I set so they all uploaded fine. Only I checked one today and noticed that they're 4,9MB PNGs each. 20 screenshots amount to 100MB...
 

BobHarbison

Active member
#9
A simple illustration of the problem further... one of our users uploaded a few dozen game screenshots. No biggie, right? Standard 1920x1200 res, under the 2000x2000 dimensions I set so they all uploaded fine. Only I checked one today and noticed that they're 4,9MB PNGs each. 20 screenshots amount to 100MB...
Exactly. I have a member who managed to upload an 800 x 1000 image (pixel wise, just fine, even a bit small) that is somehow still 1 MB in size! Ugh! I really could use a way to have it apply some jpg compression to the image if they're over say 500 kb.
 

Gladius

Well-known member
#10
Please like the first post, nothing worthwhile gets implemented without enough likes. I don't know if anything ever gets out of the unimplemented "closed suggestions" black hole, though. @Chris D ?

I still feel that we should be able to set a max image size and have XFMG automatically downsize uploaded images as per the first post (sure, limit it to a definable size to prevent abuse). I've had to disallow uploading of PNGs altogether because of the issue described in my previous post. Either users get rejected uploads unnecessarily because their file sizes are too big, or they upload a couple dozen screenshots and fill their quota. It's especially fun if they take the time to name and sort their screenshots too, only to basically have to be told to delete everything, convert their PNGs to take less space, reupload them and name them again.

And no, nobody ever has. This is like taking user-friendliness out the back and shooting it.
 

ozzy47

Well-known member
#12
I don't know if anything ever gets out of the unimplemented "closed suggestions" black hole, though. @Chris D ?
As it is stated at the top of the suggestion forum.
"These suggestions have been closed for one of a few reasons as indicated by the thread prefix. More context will be found within the thread. If a suggestion is tagged with "lack of interest" and you're still interested in it, you're free to re-suggest it in the correct forum. "
 

Gladius

Well-known member
#13
I looked in this forum, the one above and forum index and didn't see that text anywhere... I'm guessing that you're saying that the text from a different forum (core XF) applies here as well? In that case, it should be posted in this forum too, really...
 
Top