Set Sprite's Image to link with blocks

I have 26 images stored in a Local DB as links, and I want to set a sprite’s image to a random item of them. Is it possible to do so, because as far as i know, you can only add them all to the sprite type and then change the image number.