getImageFromURL method created