add functionality to automatically save some images to gallery