[WO-409] improve method to inline pictures