Avatar Optimization

Review Request #176 - Created Sept. 17, 2011 and submitted - Latest diff uploaded

Information
Adrian Budau
infoarena
Reviewers
hackers
freak93
This is an optimization for managing avatars on the server. Because there are only 5 sizes used on all the site it's more useful to resize all of the images to those 5(thus increasing the space usage by less than 100%) and when a client asks for a size give it directly rather then resizing all the time. The 5 sizes are tiny (old L16x16), small(old L32x32), normal(old L50x50), forum(old L75xL75, used only on the forum at the moment), big(old 100x100) and full(the original picture). 
To get the avatar on a size from the server simply use the page avatar/%some_size%/%some_user where %some_user% is a username and %some_size$ is a one the 5 sizes. In case the user doesn't exists or he doesn't have an avatar we use a placeholder image. If the size given is not from the list or is omitted the server return a classic 404 Error(File not found)

The script which resizes the image for the current users is called make-avatar-folder found in the scripts folder. It requires the attach folder to have permission for read and write. 

The setup has also been modified so fresh installes will work without calling the script. I have done a mysql dump. I just need to know how to ship it with the rest of the files. 

Loading...