I\'m trying to include pictures in my leaflet popups, but the popup-size doesn\'t adjust to the picture size. I found a solution to this on github:
https://github.com/Le
To handle this as someone with limited coding understanding I finally got the following to work for me in the output of the qgis2web plugin when exporting a map forenter code here
the web from QGIS 3.10. I first made all my photos the same Width - in my case 400px.
Then in the index.html file I set a minWidth of 400px as shown below. Everything works fine.
var popupContent = '\
\
\
' + (feature.properties['Name'] !== null ? autolinker.link(feature.properties['Name'].toLocaleString()) : '') + ' \
\
\
\
\
';
layer.bindPopup(popupContent, {maxHeight: 700, minWidth:400});