How do I list all used images of a page as thumbnail (for copyright notice)?

I agree with you and it makes the query complex.
It is easy to read out the whole folder. However, there are also some irrelevant images in there (logos, icons etc).
My solution: I will select the desired images with a selection field. This is manual work, but a compromise to reduce programming effort.