Merge "Support selector syntax for thumbnails in templates"