Partially fixes #42 (at least where linking images)