Added share image function to code