fix js image bug