Self Hosted Leaflet Photo

There is an excellent plugin for Leaflet called Leaflet.Photo.

The plugin was created by Bjørn Sandvik. See the full post:

The plugin has a number of examples that show usage with image hosting platforms, like Google Photos and Instagram, which have assicaited API’s for returning information about the image in question.

I was however keen to host the sollution completely myself, so simply have a folder of images that would populate on the map if they had exif GPS information.

I have created an example available on GitHub:

Simply download the full repo:

Copy the local_file_example folder. Replace the images in the Photos folder with your own photos. Load it onto any php supporting webhost.

Like: BlueHost

Or for more advanced users, the examples below are on: DigitalOcean

And link to the folder with the index.html



2 thoughts on “Self Hosted Leaflet Photo

  1. Pingback: Self Hosted Photos on a Leaflet map |

  2. Malte

    Just found your great solution. Is there a chance to make it run inside a local mac or windows folder with offline photos?


Leave a Reply

Your email address will not be published. Required fields are marked *