check to make sure post_id is set before retrieving images