Getting hold of file objects related to nodes through a field is easy using an
$wrapper = entity_metadata_wrapper('node', $node); $images = $wrapper->field_images;
So that's great. However, I want to use some of the properties of the standard file object, and they're not available. When I look at the properties available on
$images->file using the above code, I see these:
uri is missing, and in its place there's a
url property, which is the full external URL to the image file. I want to manipulate these images via their URI (create thumbs, etc), so I'm left doing this:
$fid = $images->file->fid->value(); $uri = file_load($fid)->uri;
Which seems to negate the whole point of using an
EntityMetadataWrapper in the first place.
What am I missing? Where is the URI on the wrapped file object? If it's not available, for the love of all things good and pure, why not?!
I'm aware I could deconstruct the URL back to a URI, but that also feels very unnecessary.