MediaWiki renders vector (and possibly png, gif and other) images in <gallery> with a grid background while images placed as a normal thumbnail remain without any added background.
Live example (see the comparison table): https://commons.wikimedia.org/w/index.php?title=Commons:Deletion_requests/Files_in_Category:Logos_of_Carrefour_Group&oldid=292963836
MediaWiki should offer a consistent way to render images with added background or without it. There should be a setting for it inside wikitext.