Manual:$wgCategoryMagicGallery

Details
On category pages, show thumbnail gallery for images belonging to that category instead of listing them as articles.