add length check, so posts with 1 photo will get posted