Manual:$wgThumbnailNamespaces

Details
Defines what namespaces thumbnails will be displayed for in Special:Search. This is the list of namespaces for which thumbnails (or a placeholder in the absence of a thumbnail) will be shown.