Generate legend images

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