Put defaults for image preview to code.

From #4006.