Function createImageSource