How can I create a decorative bar by repeating an image?

I guess the pattern function could help you.
I had a very similar question: