Added URL encoding for image filenames.