[[File:X & Y.png]]
Works!
<gallery>X & Y.png</gallery>
Works!
{{An infobox |image = <gallery>X & Y.png|This is an image</gallery> }}
Doesn’t work.
For some reason, when using an image with an ampersand in it in a gallery in a Portable Infobox does not work, even if you transclude the ampersand or use nowiki tags.
Can someone please explain to me why this is?