There is no option to not connect to the Gallery when playing the game. I don't want to connect to the gallery, it bloats the localthumbcache.package file, and slows game play.
I deleted the Sims 4 Folder, repaired the game, and launched the game. Under Game Options / Other, there is no option to not connect online.