Added the createImageFromName function