I'm working on a database driven website where I get a data feed from a third party which provides me with images. Unfortunately the image names that are provided are mostly random numbers and text. There's no contextual relevance. So ideally it would be best to dynamically generate a new SEO friendly filename for these images. The problem is that our database wipes out all the data every night and re-imports the entire data feed. I wish there were a script running to detect if there have been changes to the data and only import those records back in but that's not the case.

So, I wanted to find out what the consensus is about filenames for image SEO. Is it critical to use my keyword in the image filename? I was thinking that having good captions and alt tags should be good enough. When I did an image search, many that rank on top has the keyword in the filename. Thanks for any feedback!

Info on image SEO:
The Ultimate Guide for Web Images and SEO
How to Optimize Images for Better Search Engine Rankings