Select the selected attachment when open gallery media.