Refactored image posting