refacced image wrapper to serverstate