Really? This still happens? I remember it happened to me all the time back on older versions of Android on my One but it stopped happening after 4.3 I think. I would recommend wiping app data or even a factory reset but I know that won't solve the problem. Maybe try ARHD 51 or Renovate, I haven't had any issues with those roms when it came to the pictures disappearing.
Samsung Eternity > Samsung Galaxy S2 SGH-I777 > HTC One M7