• 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

Xon

Well-known member
#1
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.

Code:
	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.