add image path constant and wrap init in doc ready