basic image preview functionality; code is commented now