Update the code of rendering relative image path according Noah and Su's comments