i got another answer by Core.B which solved my problem. thank you jcarty for being responsive with me. happy coding everybody.
"You're use of document.getElementById("photoDetails").innerHTML is the problem. .innerHTML replaces everything in between the opening and closing tags of <li id="photoDetails">. Since images is in photoDetails, it is getting erased with just the imagePath.
If you want to display the imagePath, try adding a <div> or <span> and updating them with the path.
Also, I don't think you need the <access> element in your configuration file, since that is only used for accessing external servers."