Auto Tournament

Map thumbnails

Extract map preview images from the CS2 game files.

csm can pull the map preview images out of the CS2 game files. You need this only if you want the images for your own site or tool. Auto Tournament does not need it.

You need a finished install, so /home/cs2servermanager/master-install exists.

Install the Python modules

The command needs Python 3 with the vpk and Pillow modules:

sudo pip3 install --break-system-packages vpk Pillow

Go to an empty folder

The images are written to the current folder:

mkdir -p ~/cs2-maps && cd ~/cs2-maps

Extract

csm extract-map-data

You can also use Tools > Extract map thumbnails in sudo csm. With another CS2 user than cs2servermanager, set CS2_USER:

CS2_USER=mycs2user csm extract-map-data

What you get

The command reads pak01_dir.vpk from master-install and writes two folders in the current folder:

  • extracted_csgo/: the raw files from the game.
  • map_thumbnails/: for each map, a PNG, a full-size WEBP, and a WEBP that is 1280 pixels wide, for example de_mirage.png, de_mirage.webp and de_mirage_thumb.webp. Maps with more than one screenshot also get de_mirage_1.webp, de_mirage_1_thumb.webp and so on.

Images that did not change are not written again. Run it after a CS2 update to get new maps.

The csm repository also has a ready set of images in map_thumbnails.

On this page