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:
https://www.notion.so/deepspacecorps/Automated-Image-Captions-6925427559db40349c3f629d5b46fef3

https://www.notion.so/deepspacecorps/Numbering-Tables-Figures-0cacd48142a54f8cba5c148881ebe333

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

https://www.notion.so/deepspacecorps/Synopsis-Epigraph-Report-6163f4183bb1427a981053a17ee656de

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.
scrive