Closed djurdjen closed 5 years ago
uri
is a special property that is only used by element types that have Craft-managed URLs, including entries and categories.
To get an asset’s URI, use path
or getPath()
instead:
'transformer' => function(Asset $asset) {
return [
'path' => $asset->path,
];
},
I'm requesting the image from an entry that has been stored with S3. The code below:
returns:
The
uri
field isnull
somehow. Is this a bug, am I doing something wrong or is there a fix for this already?