Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently trying to use leaflet to display images (jpeg or png) instead of maps, I have followed the instructions on this blog post to create the tiles using here is the code we used -p raster -z 0-5 -w none "SOURCE_PATH.png" "DESTINATION_FOLDER"

The command produces the necessary tiles for leaflet, but the problem is that it takes around 2 minutes to create tiles for the attached image (size: 777KB, resolution: 2592x1728) and a disastrous number of tiles of around 1600 file.

I am trying to optimize the time and number of files to generate tiles for leaflet and looking for suggestions, please help.

share|improve this question
If your image is only 777KB, can't you just load it straight into Leaflet? Check this out: – Alex Leith Oct 9 '13 at 22:53

you could use TileMill to generate the tiles, this outputs all the tiles into one file, in a format called mbtiles, that's easier to use, the downside is that you can't just drop the folder onto a web server, but there are quite a few programs that can deal with the file as its just sqlite3.

You could also look at huge pic which seems to be doing something similar to what you are trying.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.