Server issue Avatars increasing size after upload to XenForo

soloarquitectura

Well-known member
Affected version
2.0.0
I guess it's something related to the PHP built-in GD image library and it's not a bug, but I comment anyway.

Sample (attached):

Avatar original image (384x384, PNG 24): 102 KB
Avatar in XenForo 2 (/data/avatars/h/x): 112 KB

Avatar after TinyPNG (https://tinypng.com/): 38 KB
Avatar in XenForo 2 (/data/avatars/h/x): 94 KB
 

Attachments

I guess it's something related to the PHP built-in GD image library and it's not a bug, but I comment anyway.

Sample (attached):

Avatar original image (384x384, PNG 24): 102 KB
Avatar in XenForo 2 (/data/avatars/h/x): 112 KB

Avatar after TinyPNG (https://tinypng.com/): 38 KB
Avatar in XenForo 2 (/data/avatars/h/x): 94 KB


You are not comparing like to like.

The png is a different file format to the jpg. png offers a lossless compression format that is better than jpg hence the file size increase
 
Despite using the jpg extension, we do maintain the existing type.

However, generally speaking, this is a GD issue. ImageMagick may be better. It was something we noticed back in the pre-1.0 days when we flipped from only using JPG compression to maintain the file type. GD's JPG compression is much better than its GIF and PNG compression.
 
Top Bottom