Imagine you have $wgUploadBaseUrl = '//images.testwiki.com';
Normal images embedded as [[File:Wiki.png]] or <gallery>File:Wiki.png</gallery>, output the image as src=//images.testwiki.com/...
However, when using <gallery mode="slideshow">File:Wiki.png</gallery>, when you inspect the image element one can see src=http://images.testwiki.com/...
If I get the HTML code directly from the server, it outputs the protocol-relative URLs correctly. However, it seems it's using JavaScript to render the slideshow and the JavaScript is rewriting those URLs as http:// ones.
This causes warnings on https:// sites using protocol-relative URLs
Version: MediaWiki 1.29