Image Max Size (and vs. page load speed) - and what should max forum image sizes be?

So I'm guessing the conversion from heif to jpeg must be happening but the size after conversion is too large for an inline image in a posting? I'll play with it a bit. I still think auto resizing the image to a lower resolution would be ideal as people would be able to use a bog standard phone without jumping through hoops. The screenshot idea that @UFighterX mentioned may be a short term solution.
 
Screenshot isn't an ideal solution. It includes random border bits which artificially reduces the image size and causes that useless border crap to be stored by the server. And if you're security conscious (+ absent minded....a bad combination!) you can actually upload sensitive info by mistake. username, phone number, other contact info, the other apps that you use, etc. Actually, having said that I'd say using a screenshot is a pretty bad solution.
 
So I'm guessing the conversion from heif to jpeg must be happening but the size after conversion is too large for an inline image in a posting? I'll play with it a bit. I still think auto resizing the image to a lower resolution would be ideal as people would be able to use a bog standard phone without jumping through hoops. The screenshot idea that @UFighterX mentioned may be a short term solution.

I'm not an iphone user but there must be a way for you to manually convert one or two pics from HEIF to JPG. Try converting them manually and see what the filesize details are.

Screenshot isn't an ideal solution. It includes random border bits which artificially reduces the image size and causes that useless border crap to be stored by the server. And if you're security conscious (+ absent minded....a bad combination!) you can actually upload sensitive info by mistake. username, phone number, other contact info, the other apps that you use, etc. Actually, having said that I'd say using a screenshot is a pretty bad solution.

Agreed. Some phone gallery apps constrain proportions based on phone screen size.
 
I'm not an iphone user but there must be a way for you to manually convert one or two pics from HEIF to JPG. Try converting them manually and see what the filesize details are.
I did this test and the JPG was 5,612,456 bytes. I suppose whatever library the server is using to convert the image might be producing larger JPG's that end up exceeding the 6MB limit.

Looking back at @mclemore's messages in this thread, I don't believe he was referring to automatically resizing how the image displays on the page but rather resizing the image file itself. There was even talk of using a 3rd party library to resize the image on the client to avoid having to do it on the server. Or maybe he was talking about both, but if you read the thread I think you will agree there was clear intent on resizing the image file to make it smaller.

Also you will see that I've apparently changed my opinion on file size vs resolution lol. I guess I just want to be able to upload images without annoying hoops to jump through like manually resizing or converting them.
 
I did this test and the JPG was 5,612,456 bytes. I suppose whatever library the server is using to convert the image might be producing larger JPG's that end up exceeding the 6MB limit.

It's possible that the iphone is converting them without compression. Perhaps there is an option to add compression/lossie to your pics on an iphone?
Looking back at @mclemore's messages in this thread, I don't believe he was referring to automatically resizing how the image displays on the page but rather resizing the image file itself. There was even talk of using a 3rd party library to resize the image on the client to avoid having to do it on the server. Or maybe he was talking about both, but if you read the thread I think you will agree there was clear intent on resizing the image file to make it smaller.

Correct. He sort of misspoke. There is limited functionality for xenforo to automatically resize certain images (if enabled) but the image requirements seem to set a very high bar. There was a xenforo plugin that gave you tons of options to resize images but it was discontinued after the 1.x codebase

Also you will see that I've apparently changed my opinion on file size vs resolution lol. I guess I just want to be able to upload images without annoying hoops to jump through like manually resizing or converting them.

I'm not against increasing the size limit. The problem is that we are well within the age of phones being literal multimedia machines with multiple camera options, multiple lenses, plugins etc. There's no way we are going to please everyone with just a simple filesize limit.
 
I realize it is a difficult problem to solve. The phones keep wanting to produce more data but it's a burden to the site to have so many needlessly high resolution images.

I did some playing. I found that Chrome has the same issue as Safari when uploading images from the photo library. Something I did find interesting is that taking a photo instead of choosing from the photo library does limit the photo to 2000 pixels or does a resize. I'm not sure why live capture and choosing from the library makes a difference.

I found a discussion from the xenforo community discussing this resize issue. It seems that the default max resolution (maxImageResizePixelCount) is set to 20 megepixels. Anything above this will fail to resize but they describe how to increase this if the server has the capacity. Maybe we could try this? I see my example picture above is at 24 megapixels (4284x5712), which could explain the reason for my issue.
 
I'm not an iphone user but there must be a way for you to manually convert one or two pics from HEIF to JPG. Try converting them manually and see what the filesize details are.

I'm not going to change my phone back to heif. It's a pain to change everything else that touches the photos and I *will* mess it up.

But IIRC, the heif was tiny compared to jpeg. Every (free) converter I found would blow a 1.5 MB heif up to 6-7 MB jpeg. That was with a variety of compression loss settings. Funny thing was (again, IIRC), if I opened those 6-7MB jpeg in MS Paint and "save as" a jpeg with default settings, it would drop it to around 3 MB.
Weird. This was all done on a Win10 PC.
 
the heif was tiny compared to jpeg. Every (free) converter I found would blow a 1.5 MB heif up to 6-7 MB jpeg. That was with a variety of compression loss settings. Funny thing was (again, IIRC), if I opened those 6-7MB jpeg in MS Paint and "save as" a jpeg with default settings, it would drop it to around 3 MB.
Weird. This was all done on a Win10 PC.

Um..not weird. Expected. ;) :p

High Efficiency Image Format (HEIF)
 
I'm not going to change my phone back to heif. It's a pain to change everything else that touches the photos and I *will* mess it up.

But IIRC, the heif was tiny compared to jpeg. Every (free) converter I found would blow a 1.5 MB heif up to 6-7 MB jpeg. That was with a variety of compression loss settings. Funny thing was (again, IIRC), if I opened those 6-7MB jpeg in MS Paint and "save as" a jpeg with default settings, it would drop it to around 3 MB.
Weird. This was all done on a Win10 PC.

Understand that formats like jpg and gif are decades old. HEIF is pretty much cutting edge and its compression algorithm is light-years ahead of JPG. The problem again lies with its patents. While there are 'open source' implementations for reading and creating HEIF images (implementation created, shared but owned by Nokia), open source projects hardly touch the format because the format is still incumbent on patents, many of which are in direct opposition to open source. Considering most of the web servers on the internet are using open source and patent-free projects to serve up the web, heif is considered somewhat taboo.

Fights like this also happened over jpg and gif in the early 2000's after both formats were already the defacto standard on the internet. Those fights however, boiled over into full blown lawsuits and multiple instances where the US Patent and trademark office had to step in and essentially invalidate multiple patents. That's a story for another day...
 
I realize it is a difficult problem to solve. The phones keep wanting to produce more data but it's a burden to the site to have so many needlessly high resolution images.

I did some playing. I found that Chrome has the same issue as Safari when uploading images from the photo library. Something I did find interesting is that taking a photo instead of choosing from the photo library does limit the photo to 2000 pixels or does a resize. I'm not sure why live capture and choosing from the library makes a difference.

I found a discussion from the xenforo community discussing this resize issue. It seems that the default max resolution (maxImageResizePixelCount) is set to 20 megepixels. Anything above this will fail to resize but they describe how to increase this if the server has the capacity. Maybe we could try this? I see my example picture above is at 24 megapixels (4284x5712), which could explain the reason for my issue.

I briefly mentioned this ability in a previous post but didn't link to the XF thread. Unfortunately making these changes is beyond what I can do here and Mclemore will have to make the final decision and execution on that. Be it enabling this feature or increasing the size limit or both.
 
Understand that formats like jpg and gif are decades old. HEIF is pretty much cutting edge and its compression algorithm is light-years ahead of JPG. The problem again lies with its patents. While there are 'open source' implementations for reading and creating HEIF images (implementation created, shared but owned by Nokia), open source projects hardly touch the format because the format is still incumbent on patents, many of which are in direct opposition to open source. Considering most of the web servers on the internet are using open source and patent-free projects to serve up the web, heif is considered somewhat taboo.
Nokia's license forbids commercial use, it's why open source implementations can't use it. There are projects like libheif or libde265, but those have limitations themselves.

Considering it's an Apple-product specific issue, and outside of Safari no other web browsers support it, I don't see why Mclemore would put any effort into supporting it here.
 
Nokia's license forbids commercial use, it's why open source implementations can't use it. There are projects like libheif or libde265, but those have limitations themselves.

Considering it's an Apple-product specific issue, and outside of Safari no other web browsers support it, I don't see why Mclemore would put any effort into supporting it here.

He shouldn't. I simply said the filesize and resize issue should be brought up to him. HEIC IMO is nowhere near where it needs to be in order to be widely adopted like jpg or png.
 
I don't think this is an issue about Safari or supporting heic. Smaller images work and Chrome has the exact same issue.
 
Maybe this should be a separate post, but any thoughts on supporting mp4 format for attachments?
 
Maybe this should be a separate post, but any thoughts on supporting mp4 format for attachments?

You can upload MP4 videos to the media section however it's rather comically crippled. The media sections video upload feature won't automatically generate a preview image for your video. You also can't embed your own video into the forums.

This is something xenforo really needs to handle better in the future.
 
Back
Top Bottom