Remove pictures from photo app

I have a problem. I have added a file called .nomedia to the document folder and when I go into the photo app and select “your photos” I still see the photos from the document folder but if I click on “your folders” in the photo app they are not there. I have tested -u www-data php occ files: scan andreas and it does not help me to get rid of the pictures.