Do files on USB drive leave any trace on iMac (macOS Sierra)?
If you open a folder with files residing on an external drive, thumbnails will be created on the boot drive depending on the file type and the installed QuickLook plugins.

The previews, metadata and file paths are stored in SQLite database files deep inside the var folder in the com.apple.QuickLook.thumbnailcache folder. The path to this folder contains arbitrary folder names.

With the proper commands the preview pics can be extracted from the database.



To remove the pic previews and other data you would have to delete the content of the folder.

Related links: 


View thumbnail cache in OS X
Collecting Quick Look Data From a Live macOS System