Made link attachment thumbnail disabling configurable at build time

Redo of the link attachment thumbnail disabling to be configurable at build time.