make image beacon feature work in py2.6/3.2/3.3