I have a User Card display with multiple fields, one of which is the 'user_picture.' In the 'manage display' tab, I selected the 'URL to image' format, which is supposed to provide the image link in the JSON output. However, this is not what is happening.
Please refer to the images below for illustration purposes.

Comments

Ricardocg created an issue. See original summary.

keshav patel’s picture

StatusFileSize
new1.4 KB
new68.31 KB

The patch '3367894_2.patch' fixes the issue, now the output also contains the URI.

keshav patel’s picture

Status: Active » Needs review
subhashuyadav’s picture

StatusFileSize
new688 bytes

I guess #2 will only work for referenced fields. A direct call to file entity for example like `/ejson/file/{uuid}` will not render the uri value. Attaching the updated patch which handles both reference fields as well as direct call to file entity.

rfmarcelino’s picture

Status: Needs review » Fixed
StatusFileSize
new134.83 KB

Thank you @subhashuyadav and @Keshav Patel.
Committed with the URL instead of the URI and some extra file data (name, size, type)

rfmarcelino’s picture

Status: Fixed » Closed (fixed)