I'm constantly going back and forth from my audio editor and preferences for "close media files when not the active application". Is there a quick key stroke?
Only menu or toolbar items can be assigned keystrokes. Why do you want to keep changing the option? I do the same sort of workflow and leave the option setting permanently checked.
Strange. I typically edit video slide shows with more than 1,000 image files of all pixel sizes, ratios, and format types; and I've never experienced a slowdown because of this option setting. Are you regularly flushing your Project to eliminate unused media?