Change the path of image to a relative path from an absolute path