title: How can I add a local image on a map in leaflet?
body: <p>I want to put a local image onto my leaflet map in R like this (I put the image manually in paint):</p>
  
  <p><a href="https://i.stack.imgur.com/L9keX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L9keX.png" alt="enter image description here"></a>
  I tried this based on the example in <code>?mapview::addLogo</code>:</p>
  
  <pre><code>library(mapview)
  library(leaflet)
  
  cities &lt;- read.csv(textConnection("
      City,Lat,Long,Pop
                                        Boston,42.3601,-71.0589,645966
                                        Hartford,41.7627,-72.6743,125017
                                        New York City,40.7127,-74.0059,8406000
                                        Philadelphia,39.9500,-75.1667,1553000
                                        Pittsburgh,40.4397,-79.9764,305841
                                        Providence,41.8236,-71.4222,177994
                                        "))
  
  img1 &lt;- system.file("img1.png", package = "png")
  
  leaflet(cities) %&gt;%
      addTiles() %&gt;%
      addCircles(lng = ~Long, lat = ~Lat, weight = 1,
                 radius = ~sqrt(Pop) * 30, popup = ~City)%&gt;%
      addLogo(img1, src = "local", position = "bottomright", alpha = 0.3)
  </code></pre>
  
  <p>but it didn't add the image to the map: </p>
  
  <p><a href="https://i.stack.imgur.com/V6cXK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V6cXK.png" alt="enter image description here"></a></p>