Fix IE error when automatically loading HTML image