add createlink and insertimage function