When enabling AB Testing for a home page, images everywhere on the site become broken - with some probability related to "Participation percentage" parameter in home page test.
Affected images are any image - static ones from disk, or static ones from packages (like, background image on login screen from /util path), or images from blobs (media). They are being returned like a binary stream sent with UTF-8 encoding or something similar.
Even the images in the default CMS login screen get broken.
Only images are served through path /episerver/ (in CMS editor) have no problems. Another exception are SVG images, because they're actually XML documents.
Step to Reproduce
We were able to reproduce issue with AB Test package on Alloy Demo sample site (with all episerver.* packages updated to latest versions)
1. In code, add following code into Global.asax.cs:
protected void Application_BeginRequest()
var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
2. Start AB Testing on Home page.
3. Flush cache, do a hard refresh on the browser. Images are unable to load.
On Chrome, it won't throw any error, just simply display blank 1x1 images. On Firefox, there'll be errors in browser console.