made the image location dynamic using location.origin