Add createImage function to designer.