1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Avatars should preserve extension for file type

Discussion in 'Closed Suggestions' started by Xon, Dec 30, 2014.

  1. Xon

    Xon Well-Known Member

    XenForo blindly assumes that all avatars are jpegs when constructing the URL, despite that gif and pngs (and potentially other future image formats) can be stored for various avatar sizes.

    	protected static function _getCustomAvatarUrl(array $user, $size)
    		$group = floor($user['user_id'] / 1000);
    		return XenForo_Application::$externalDataUrl . "/avatars/$size/$group/$user[user_id].jpg?$user[avatar_date]";
    One consequence of this is that the html header "X-Content-Type-Options=nosniff" can not be used on the entire site.
    semprot likes this.

Share This Page