Messy but working support for online images