Remove image parameters and encode uri component