Make img work with http and https