1. 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

Discussion in 'Troubleshooting and Problems' started by Luxus, Jan 27, 2013.

  1. Luxus

    Luxus 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
  2. Jake Bunce

    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.
    Luxus likes this.

Share This Page