Error Occurs When Using Document Understanding Project Extractor Activity to Extract Data from a .png Image File: "The Provided DOM and Content Do Not Match"

Why does the Document Understanding Project Extractor activity return the error "The provided DOM and content do not match" when processing a .png image file? Error code: [MismatchingDomAndContent].

Issue Description

While utilizing the Document Understanding Project Extractor activity to extract data from an image file with a .png extension, an error occurs stating:

"The provided DOM and content do not match. Make sure the DOM was generated on the provided document."

The error code associated with this issue is [MismatchingDomAndContent].

Root Cause

Upon examining the DOM object generated from this file, the ContentType appears as image/jpeg, whereas the file itself has a .png extension. Ideally, a .png file should have a ContentType value of image/png. This inconsistency between the file's extension and its ContentType is likely the root cause of the issue.

Resolution

Update the file suffix from .png to .jpeg.