I have to make a widget from where the user will be able to add a few images and then I will show only some of them, randomly, and it will be automatically changed on page refresh. The problem is that the number of images is not known, it may be 2, it may be 5. I was thinking of using an "add more" jQuery button but I have problems with working on data from an array.

Has somebody done something like this before? If you have another idea about doing this, I'd be glad to hear of it.

Note: If you have knowledge about a widget which uses this kind of function do not hesitate to tell me, maybe I can get inspiration from there.