Correctly check whether previewImageLink is set

Fix #1729