How can I make to always get same url, so the image path won’t change. It’s ok if domain is http://www.domain.com/cat but then http://www.domain.com/cat/cat it points to cat/images/img.jpg
"background-image" : "url(../images/" + photoObject.image + ")",
When you use “../” it means “look in the parent directory of this document”.
If you start with “/”, it means “start looking from the root directory”
So for example,
If the root of the site is /cat then use