In QGIS 3.16. This is related to this question and this question for which the only posted answers do not solve my problem.
I am creating a report with a field group section; the goal is to have 1 page per feature, with various attributes of each feature displayed on the page. One attribute is 'Image' which links to a .JPG (via Layer Properties-->Attributes Form-->Widget Type = Attachment).
In order to display the image on the page, I have done the following: 'insert image', then in Object Properties, 'Data-defined value', and from the menu, "Field type: string" and select the 'Image' attribute.
When I do that, the image box is filled with a giant red X. If I try to export the report to PDF, I get a two-panel error message; the top panel reads "The image source is missing or corrupt", and the bottom panel reads "The source of the image cannot be loaded or is corrupt" followed by the correct name of the .JPG file it attempted to load.
The files are not missing or corrupt; the attribute is the correct type (String, with a sufficiently long character limit), the 'Image' link works fine in the Identify Features form window, and the images are visualized as expected. It is only here in the Report view that it seems to be getting jammed somehow.
Edit: here is a link to 5 screenshots showing 1)How the image is linked to the field; 2)Correct display of the image via the "Identify features" tool; 3)How the image source is selected for the report; 4)The way the image object displays in the report; and 5)The error message when attempting to export to PDF.