How to prevent expansion on wood block wall/door
The wood will swell slightly with higher humidity but if you don't have it in a frame and are mounting it like a sliding barn door then I wouldn't worry about expansion.

The problem with expansion is mostly for doors and windows in frames that causes them to jam.

Also, like the picture you posted, if the wood is cross-cut it will be less likely to expand and contract.

I would be more worried about the panel you are attaching them to warping then the blocks themselves.

Cool idea for a door.