This question has been answered by Bruno17. See the first response.
I think you can create a mediasource to a folder, where everyone can have access to.
And give all usergroups access to that mediasource.
[[migxResourceMediaPath? &pathTpl=`assets/resourceimages/{id}/`]][[migxResourceMediaPath? &pathTpl=`assets/userimages/{username}/`]][[migxResourceMediaPath? &pathTpl=`assets/gallery/{alias}/`&createFolder=`1`]]<img src="[[*hoofdafbeelding]]" alt="[[*pagetitle]]">
[[!getResources?
&parents=`[[*id]]`
&tpl=`gallery_row_tpl`
&includeTVs=`1`
&processTVs=`1`
&tvPrefix=``
&limit=`0`
&sortby=`RAND()`
]]
<img src="[[+hoofdafbeelding]]" alt="[[+pagetitle]]">
[[!getImageList? &tvname=`image` &tpl=`galleryImage` &limit=`1` &docid=`[[+id]]` ]]