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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ricardocg created an issue. See original summary.

Keshav Patel’s picture

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

FileSize
688 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
FileSize
134.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)