I am already trying for over an hour and cant figure out the right way to do it, although it is probably pretty easy:
I have something like this : foo/bar/test
foo/bar/test
Try this:
const url = "files/images/gallery/image.jpg"; console.log(url.split("/").pop());