writeValue(value: string): void { this.imgSrc = value; // Clear the file input element's value after setting the image source this.fileInput.nativeElement.value = ''; }