Conditional statements for post images