resourceloader: Omit parameter 'lang' from image URLs when not vary
authorFomafix <fomafix@googlemail.com>
Thu, 27 Jun 2019 12:28:17 +0000 (14:28 +0200)
committerKrinkle <krinklemail@gmail.com>
Thu, 11 Jul 2019 19:06:24 +0000 (19:06 +0000)
commit01a4a58982802055b231ca82fcbab092125112ef
tree8fe71f515f29ec2e0ec141b207d7060855eb46b2
parentf92a1a6db3b659d9943ca66eacff99b5e4133c7b
resourceloader: Omit parameter 'lang' from image URLs when not vary

The parameter 'lang' is only added to the URL when the image vary on the
language or on the direction.

Also omit the parameter 'lang' when the value is equal to
ResourceLoaderContext::DEFAULT_LANG.

This change makes the URLs shorter and reduces the size of the
stylesheets.

This change also improves caching because the URLs do not vary on the
language for the same image.

Change-Id: Id7d8ecc7d95747f3c157f9abc12e8489e5085aff
includes/resourceloader/ResourceLoaderImage.php