Has anyone implemented server side image resizing for Xenforo?

TrevC

Well-known member
As the title states, I really wish Xenforo included some server-side image resizing features. I don't see CSS resizing + file upload limits as being very practical or user-friendly. Has anyone ever implemented a solution to this problem?

Ideally, we could keep an upload limit of something larger(like 10-15mb per file), preventing the unfriendly file-size error messages when visitors upload photos. Xenforo would then use some PHP/graphics library magic for resizing to a specific max-width/length.

I realise this could easily eat up a good chunk of server memory and CPU time. However, I think it's worth it considering the benefits.
 
XenForo already resizes some images, especially avatars that are saved under 3 different sizes: small 48x48, medium 96x96 & large 192x192.

But it seems there are limitations on which file size the server can proceed, due to memory issues, see XenForo_Image_Abstract::canResize() :
PHP:
pubmic static function canResize($width, $height)
{
	// only resize up to approximately 16MP due to memory issues
	return (($width * $height) < 16000000);
}
 
Thanks for the info. I wonder if anyone has done a mash-up with that function and the existing attachment system.

RAM isn't much of a concern, we'd much rather add a few more gigs and have server resized images. :)
 
We've solved this by re-purposing the Xenforo "thumbnails" function (and hacking templates) to become 1024x1024 contained images in posts, which of course link to the originals. Bingo! seamless server-side image re-sizing. IMO, browser resized images are a very ugly solution when every large image is being scaled client-side.

We've stress tested it with piles of 5mb images. GD's still happy. It's no problem for a modern Xeon with 2 gigs of memory and RAID SSD's. Post/PHP limits had to be increased somewhere, I'm not sure what our sysadmin did specifically. This solution drastically improves load times and scrolling performance, especially on mobile devices.

Now, where can we tweak GD settings to strip EXIF data and other options?

Screen%20Shot%202012-12-31%20at%2013.04.30.png
 

boahhhh.... this Editor looks very nice!!!! (y)

This editor is something special and looks very much user-friendly.
As with the current XF-editor, the average user is not able to even find the button of how to upload an image.


Is this XenForo ?
May I have a look at your website, please ? :)
 
Yep, it's Xenforo. Heavily customised (plenty of template hacks and I re-wrote most of the styles).

Xenforo is a great base, but it has some usability and design issues. I also think the stock styles and most Xenforo themes look fairly old fashioned and unnecessarily cluttered.

It's getting better every day, but is fairly tedious work.

Omega%20Watch%20Forums.png



 
Xenforo is a great base, but it has some usability and design issues. I also think the stock styles and most Xenforo themes look fairly old fashioned and unnecessarily cluttered.

totally agree.

Oh, I do remember your OMEGA website. It looks fabulous now and seems to be very easy to use.
 
Back
Top Bottom