Pictures and videos disappear from my gallery after connecting via USB
Check if you have a hidden file named .nomedia (double check also for uppercase name) on device memory (storage folder) and delete.

Go to Settings -> Apps -> ALL -> Media Storage. Select Clear data + Clear defaults. Disable the App.

Reboot the device. Now enable again Settings -> Apps -> ALL -> Media Storage. 

Wait a couple of minutes (so it should reindex files). I think all files should be now again in Gallery. Note: Do not try to run any rescan App, just follow the above steps.

Source: Images have disappeared from gallery, but still in &quot;My Files&quot; (Samsung Galaxy S6 Edge, 5.0.2)