In the QGIS Python console, this block of code returned a valid object in QGIS 2.16.3 and I think 2.18.6. I could view the static image in QGIS.
>>> reg = QgsMapLayerRegistry.instance() >>> raster = QgsRasterLayer('https://maps.googleapis.com/maps/api/staticmap?center=51,0&zoom=10&size=2550x3300', 'test') >>> raster.isValid() >>> reg.addMapLayer(raster)
At least since 2.18.9 (tested 2.18.15 as well),
raster.isValid() returns False.
This is not specific to the Google Static Maps API. The code block also used to work if loading other PNG/JPG images.
Am I missing a required component?