Reworked imaging functions

Updated imaging functions: now when uploading an image it creates a
fullsize as well as an avatar/profile sized image (for use with user
profile and profile box items) and stores both.