# Map pictures (BAR Fight 2.0)

222 exact map versions from the official BAR maps-metadata `lobby_maps.validated.json`, retrieved 2026-10-15
(https://maps-metadata.beyondallreason.dev/latest/lobby_maps.validated.json). One picture per map, named by the map's site slug
(`supreme-isthmus.webp`, `all-that-glitters.webp`, `aethermoor-creek-1-0.webp`). Those two slugs are the ones the public map guides
already use (`public_map_insights.MAPS`); every other slug is the lower-case map name with runs of other characters turned into one
hyphen (the slug includes the version, for example `altair-crossing-v4-1`).

`../maps-catalogue.json` records, for every map on the site, the original picture URL (`image_url`), the author (`author`), the
exact version (`name`), the start layout and the picture path. Pictures are resized to 640 pixels (the same CDN path with a smaller
`fit-in` box) and encoded as WebP for phones. `../../../build_maps_catalogue.py` rebuilds the catalogue and fetches any picture that
is missing; it never replaces a picture that already exists.

Every exact-version match with an official preview gets a picture, regardless of popularity or starting-position coverage.
Previously downloaded official previews are retained for the exact historical version if it leaves the latest metadata.
Of the 225 current maps, Vittra 3, Ceasefire 1.0 and Pyroclast 1.0.3 still lack exact-version previews.
Maps without a picture show a drawn contour stand-in (decorative, not map data).

Rules

- Exact map versions only. A picture of another version of a map is never substituted. A missing picture is never guessed.
- Credit the map author wherever a picture is shown as map content: "Map by <author>, via BAR maps-metadata" with a link to
  https://github.com/beyond-all-reason/maps-metadata. Small card and shelf thumbnails are decorative and carry the map name in the
  card text; every main picture carries alt text with the author and a visible credit line.
- Start positions come from each exact version's authored `startPos.positions` and team layout. The catalogue keeps the biggest
  team setup; roles are BAR's own coarse roles (front, tech, air, sea and mixes). Coordinates are 0 to 1 on the picture. These are
  authored reference positions, not a claim that every spot is occupied. Spot names exist only for Supreme Isthmus v2.1 (verified,
  `spot_equivalence.POSITION_NAMES`) and All That Glitters v2.2.3 (community names from Gex, not verified, `map_spots`).
- The pictures are not used as maps of the game state: they are shown for orientation only.

Source: https://github.com/beyond-all-reason/maps-metadata

## Thumbnails (`thumbs/<slug>.webp`)

Every map that has a picture also has a 320 px thumbnail, `thumbs/<slug>.webp` (about 19 KB each, a third of the 640 px picture), fetched from the
same maps-metadata image service with the same URL and quality, one small request per picture and only for pictures that already exist
(122 requests in all, `User-Agent: bar-fight-maps-catalogue/1`). The catalogue records the path as `thumb` next to `image`. Cards, the Home
shelf, the map chip sheet and the search results use the thumbnail; the 640 px picture is for map hubs (their header, which is also preloaded),
the starts picture and the featured guide cards. `../../../build_maps_catalogue.py` writes them when it rebuilds the catalogue; to add them to the
catalogue that is already here, without any other network use, run `python build_maps_catalogue.py --thumbs-only`. A thumbnail is never replaced.
The credit rule is the same: thumbnails are decorative and carry the map name in the card text.
