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

Editing GD library to force image dimensions


Well-known member
"m" images and "s" images have both fixed widths and heights. m is 96x96 and s is 48x48. However this is not the case with "l" images. I have several l images with different dimensions. I was trying to figure out how the gd library resizes them because there must be some rules defined for this somewhere. I was not able to figure it out. The Gd.php doesn't mention m, s and l images. So how can I force Gd to create l images with a lets say fixed width of 150 pixels?

Edit: Nevermind, here is the solution: http://xenforo.com/community/threads/which-style-property.31695/#post-363047

Jake Bunce

XenForo moderator
Staff member
The large physical image itself is not cropped because the profile page shows the uncropped large image. But CSS is used to render with large square dimensions when you call an avatar using the "l" size:

<xen:avatar user="$user" size="l" />
That's it. No CSS or file changes required.