Skip to main content

Images not loading in maps

This troubleshooting guide covers different situations where images will not load when added to a map.

Adding images to a map style

To use images for things like symbol layers, line patterns, and fill patterns in map, the images must either be already included as part of the style or loaded at runtime after the map has been initialized.

The methods used to load images at runtime using the various Mapbox mapping libraries and SDKs are:

Map RendererMethod
Mapbox GL JSmap.loadImage()
Mapbox Maps SDK for iOSstyleManager.addImage()
Mapbox Maps SDK for AndroidstyleManager.addImage()

Incorrect File Format

When adding an image to a style at runtime, only the following file types are supported:

  • .png
  • .jpg
  • .webp

Other file types, for example: .svg, are not supported and will throw an error.

Be sure to check your debug console to make sure that there are no errors when adding images to your style.

Troubleshooting SVG image errors in Mapbox Studio

If you're having trouble adding an .svg to Studio, see our Troubleshooting SVG image errors in Mapbox Studio troubleshooting guide.

Was this page helpful?