public function setAvatarSize($size)
    {
        $this->size = intval($size);
        if ($this->size > 512 || $this->size < 0) {
            throw new InvalidArgumentException('Avatar size must be within 0 pixels and 512 pixels');
        }
        return $this;
    }