added the method getting img path