Is there a function in scrivener to create such an index?

No, but I have a few ideas that can get you there.

Put images in documents of their own, with a section layout of their own, and create a Collection for them based on a search for $img or the section type. Create a Compile format for the index and specify that Collection when you Compile.

Examples below illustrate the ideas you’ll need. (Mac-centric notes, but the same ideas should work in Windows.)

Image Captions and numbering:

Collections, compiling a collection, and using a separate Compile format from the same content:

If you happen to be using LaTeX with Scrivener, the following is a sample of the List of Figures that can be made available, as well as a similar List of Tables and Table of Equations that can also be made available (the headings can be renamed):
[attachment=2]List of Figures.png[/attachment]
[attachment=1]List of Tables.png[/attachment]
[attachment=0]Table of Equations.png[/attachment]
Let me know if this is of interest to you.