2

How can I get the file URI of a Drupal\image\Plugin\Field\FieldType\ImageItem instance?

I get the field value with $node_entity->get('field_image')[0] but I don't know how to get the file URI.

1 Answer 1

4

You can use

$image_item->entity->getFileUri()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.