No need to write custom queries.
You can use normal repeater with your path should be Images folder and Page Type should be CMS.File
And you can use this transformation
Hope this should solve your problem
If it works , please mark this as correct answer.