To convert a drone orthophoto to XYZ tiles in QGIS, load the GeoTIFF, then run Processing > Toolbox > Raster tools > Generate XYZ tiles (Directory). Set the extent, a minimum and maximum zoom, and an output folder. QGIS writes a folder of image tiles in the {z}/{x}/{y} layout. You can load them back into QGIS or use them in a web map. If you want one file instead of a folder, use Generate XYZ tiles (MBTiles).
These steps match the current QGIS documentation. As of October 2026 the latest release is QGIS 4.2 and the long-term release is 3.44. Last checked: October 2026
Key Takeaways
- Export the orthophoto as a georeferenced GeoTIFF. OpenDroneMap names it odm_orthophoto.tif.
- The XYZ tools draw the visible layers of your QGIS project. They do not ask for an input layer, so hide everything you do not want in the tiles.
- XYZ tiles always use the Web Mercator grid (EPSG:3857).
- Pick the maximum zoom from your pixel size. Each extra zoom level makes four times as many tiles.
- Load the result from the Data Source Manager (XYZ tab) with a file:/// URL, or open the MBTiles file as a raster layer.
Choose the Right Orthophoto Export

Export the orthophoto as a GeoTIFF with the location data stored inside the file. A plain JPEG or PNG has no position unless it comes with a world file.
OpenDroneMap (ODM) saves the orthophoto as odm_orthophoto.tif. WebODM runs ODM, so you get the same file there. ODM’s default is 5 cm per pixel. It caps this value at the estimated ground sampling distance, so you cannot ask for finer pixels than your photos can give.
ODM can also write its own tiles with the –tiles option, which is off by default. Use QGIS when you want to control the extent, zoom range and file format, or when you want to add other layers.
Prepare the Orthophoto in QGIS
- Add the file with Layer > Add Layer > Add Raster Layer, or drag it into QGIS.
- Open Layer Properties > Information and check the CRS and the pixel size.
- If the CRS is empty, use Raster > Projections > Assign Projection and pick the correct one. Do not reproject here.
- If the image has no location data at all, use Layer > Georeferencer and add ground control points spread across the image. ODM files are already georeferenced, so skip this for them.
- Turn off every other layer, such as basemaps, so they are not drawn into the tiles.
Set the CRS Before Tiling
Tiles use Web Mercator (EPSG:3857). Your GeoTIFF can stay in its own CRS, often a UTM zone, because QGIS draws it on the fly. Set the project CRS to EPSG:3857 so the map you see matches the tiles. Click the CRS button at the bottom right of QGIS, or open Project > Properties > CRS.
Only make a reprojected copy if another program needs it. Use Raster > Projections > Warp (Reproject) for that.
Choose Tile Size and Zoom Levels
The default tile size is 256 x 256 pixels, which most web maps expect. The Directory tool lets you change the tile width and height. The MBTiles tool has no tile size setting.
The zoom level sets how small one pixel is on the ground. This table shows the size at the equator:
| Zoom | One pixel on the ground |
|---|---|
| 15 | 4.8 m |
| 16 | 2.4 m |
| 17 | 1.2 m |
| 18 | 60 cm |
| 19 | 30 cm |
| 20 | 15 cm |
| 21 | 7.5 cm |
| 22 | 3.7 cm |
Away from the equator, pixels get smaller. Multiply the number by the cosine of your latitude. That is about 0.87 at 30 degrees and 0.71 at 45 degrees.
- Maximum zoom: pick the level whose pixel size is closest to your orthophoto’s pixel size. Example: a 5 cm orthophoto at 30 degrees latitude fits zoom 21, which gives about 6.5 cm.
- Minimum zoom: set it 4 to 6 levels below the maximum. Low levels add very few tiles.
- Tile count: each extra zoom level makes four times as many tiles. Do not add levels you do not need.
Convert a Drone Orthophoto to XYZ Tiles in QGIS
- Open Processing > Toolbox and search for Generate XYZ tiles. The tools are in the Raster tools group.
- Double-click Generate XYZ tiles (Directory).
- For Extent, click the extent button and choose Calculate from Layer, then pick your orthophoto.
- Set Minimum zoom and Maximum zoom from the table above.
- Choose the Tile format and set an Output directory.
- Click Run. Test on a small extent first if your orthophoto is large.
These are the settings of the Directory tool:
| Setting | What it does | Default |
|---|---|---|
| Extent | Area to tile | Required |
| Minimum / Maximum zoom | Zoom range, 0 to 25 | 12 / 12 |
| DPI | Render resolution, 48 to 600 | 96 |
| Background color | Fill for empty areas | Transparent |
| Enable antialiasing | Smooths edges | On |
| Tile format | PNG or JPG | PNG |
| Quality | JPG only, 1 to 100 | 75 |
| Metatile size | Tiles drawn together, 1 to 20. A larger value speeds up rendering. | 4 |
| Tile width / height | Pixels per tile, 1 to 4096 | 256 / 256 |
| Use inverted tile Y axis (TMS) | Writes TMS numbering instead of XYZ | Off |
| Output directory | Folder for the tiles | Temporary folder |
| Output HTML (Leaflet) | Optional preview page | Temporary file |
PNG keeps transparency and loses no detail, but the files are larger. JPG files are smaller, but JPG has no transparency. The tool also has optional HTML title, attribution and OpenStreetMap basemap settings for the preview page.
MBTiles: One File Instead of a Folder
Run Generate XYZ tiles (MBTiles) from the same Raster tools group. It has the same extent, zoom, DPI, background, antialiasing, format, quality and metatile settings. It has no tile size, TMS or HTML options. It writes one .mbtiles file, which is easy to copy and share.
Another Option: The QTiles Plugin
QTiles is a plugin from NextGIS that makes tiles from a QGIS project. Version 2.1.0 (April 2026) works with QGIS 3.32 and newer, including QGIS 4. It supports Slippy Map (XYZ) or TMS naming and can save to MBTiles. Install it from Plugins > Manage and Install Plugins if you prefer a plugin window to the Processing tools.
Make Tiles With GDAL Instead
GDAL can tile the GeoTIFF directly, without a QGIS project:
gdal2tiles --xyz --zoom=15-21 --processes=4 odm_orthophoto.tif tiles
Use –xyz. Without it, gdal2tiles numbers tiles the TMS way, with y=0 at the south. The default profile is mercator and the default tile size is 256 pixels. On some installs the command is called gdal2tiles.py.
GDAL 3.11 added a newer command with XYZ numbering by default:
gdal raster tile --min-zoom=15 --max-zoom=21 odm_orthophoto.tif tiles
In GDAL 3.13 and newer, gdal2tiles is deprecated and calls this new command.
Check Tile Quality and Alignment
- Load the tiles into QGIS (see the next section).
- Put a basemap such as OpenStreetMap under them. Switch your tiles on and off and check that roads and building edges line up.
- Zoom in to your maximum zoom and check sharpness. Zoom out to the minimum and check that the whole site is covered.
- Look for empty squares or hard seams at the edges.
If the image is no sharper at your top zoom level than one level below, the maximum zoom is higher than the photo detail. You can drop that level and save space.
Fix CRS, Extent, and Zoom Errors
| Problem | Likely cause | Fix |
|---|---|---|
| Tiles are blank | The orthophoto layer is hidden, or the extent is wrong | Turn the layer on and set the extent with Calculate from Layer |
| Tiles are in the wrong place | The raster has the wrong or no CRS | Use Assign Projection with the correct CRS |
| Edges are cut off | The extent is smaller than the image | Set the extent again from the layer |
| Web map shows upside-down or missing tiles | TMS and XYZ numbering mixed up | Leave the TMS option off. In Leaflet, set tms: true only if you turned it on. |
| Black background around the image | JPG has no transparency | Use PNG, or set a background color |
| Image looks soft | Maximum zoom is lower than your pixel size needs | Raise the maximum zoom |
| Run takes very long | Too many zoom levels or too large an extent | Remove levels you do not need and test a small extent first |
Use XYZ Tiles in QGIS and Web Apps
In QGIS
- Open Layer > Data Source Manager (Ctrl+L) and choose the XYZ tab.
- Click New and give the connection a name.
- For URL, enter the path to your folder, for example file:///C:/maps/ortho/{z}/{x}/{y}.png. Use .jpg if you made JPG tiles.
- Set the minimum and maximum zoom to the levels you made.
- Set Tile Resolution to Standard (256×256/96 DPI), then click Add.
For an MBTiles file, add it as a raster layer with Layer > Add Layer > Add Raster Layer, or drag it in from the Browser panel.
In a Web Map
Tiles are plain static files. Upload the folder to any web host or storage bucket and use a URL like https://example.com/ortho/{z}/{x}/{y}.png. In Leaflet, set maxNativeZoom to your highest zoom so the map stretches those tiles instead of showing blanks when users zoom further:
L.tileLayer('https://example.com/ortho/{z}/{x}/{y}.png', { minZoom: 15, maxNativeZoom: 21, maxZoom: 22 }).addTo(map);
You can also open the Leaflet HTML file the Directory tool writes to preview the tiles in a browser.
Frequently Asked Questions
Can I tile a georeferenced JPEG orthophoto in QGIS?
Yes, if QGIS can read its location, for example from a world file. The tool tiles whatever is drawn in the project. JPEG is lossy, so a GeoTIFF is the better source.
Do XYZ tiles keep the original resolution?
Only up to your maximum zoom. Past that level, a viewer stretches the last tiles and the image gets soft. Pick the maximum zoom from your pixel size.
How long does tile creation take?
It depends on the extent, the zoom range, the format and your computer. Each zoom level has four times as many tiles as the one before, so the top levels take most of the time. Test a small extent first.
Can I combine several orthophotos into one tile set?
Yes. Add them all to the project, set the layer order, and run the tool once with an extent that covers all of them. You can also merge them first with Raster > Miscellaneous > Build Virtual Raster.
Will the tiles work offline in a mobile app?
That depends on the app. Many mapping apps can read MBTiles files, so the .mbtiles output is the one to try. Check your app’s documentation for the formats it supports.
Conclusion
Export a georeferenced GeoTIFF, hide other layers, and run Generate XYZ tiles with the right extent and zoom range. Pick the maximum zoom from your pixel size, then load the tiles and check them against a basemap.