How do I use an image twice, from my own database using the url (Help ASAP)

I wanted to use the image in two places once for the background in a slideshow and then a second time as a background to a lightbox. Although, when I try this it only appears in one place or the other. I need help ASAP

If it’s an image declared in a background, reuse the class for the background on another element, the bg will show up.