Generate legend images

Don't include the '/wmts' in the base URL in the server mode (it can also be '/static')