Added check to see if image path is relative or absolute