fix to write image url