Adding method to capture and publish images