I'm not convinced that this is worth a special function.  Unless you also add functions for things like selecting and unselecting thumbnails.