title: Adjusting image to popup size for shiny leaflet
body: <p>I am trying to figure out how to change the image size so that it matches the popup size. For example, in the picture below, the image extends beyond the popup dimensions. Is there a way to add script to leaflet code below to account for this? Also the image dimensions are too big, how can I resize it inside the popup option as set up below? There is a shelter1.bindPopup() function for CSS. Is there a way to possibly incorporate that in the code below?</p>
  
  <p><a href="https://i.stack.imgur.com/z0Fsd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z0Fsd.jpg" alt="enter image description here"></a></p>
  
  <pre><code>leafletProxy("map2") %&gt;%
    clearMarkers() %&gt;% 
    clearPopups() %&gt;% 
    setView(lng = clng, lat = clat, zoom =11) %&gt;% 
    addMarkers(lng = as.numeric(longitude), lat = as.numeric(latitude),
    popup = paste("&lt;h4&gt;", "NAME", "&lt;/h4&gt;",
                  paste0("&lt;img src = ", imageURL, "&gt;"), 
                  "&lt;br&gt;"), popupOptions = popupOptions(minWidth = 500, maxWidth = 500, maxHeight = 500))
  </code></pre>