Mam więc ten Węzeł:
object(Drupal\node\Entity\Node)[1862]
protected 'values' =>
array (size=17)
'vid' =>
array (size=1)
'x-default' => string '7' (length=1)
'langcode' =>
array (size=1)
'x-default' =>
array (size=1)
0 =>
array (size=1)
'value' => string 'en' (length=2)
... (more fields)
'field_image' =>
array (size=1)
'x-default' =>
array (size=1)
0 =>
array (size=5)
'target_id' => string '1' (length=1)
'alt' => string '' (length=0)
'title' => string '' (length=0)
'width' => string '150' (length=3)
'height' => string '120' (length=3)
Teraz field_image ma tablicę z x-default i podstawowymi danymi obrazu. Jak wyświetlić obraz lub utworzyć łącze do obrazu w szablonie Twig?
Recoverable fatal error: Object of class Drupal\Core\Field\FieldItemList could not be converted to string więc spróbowałem z tym: url(node.field_image.0.entity.uri.value)ale potem to po prostu mówi mi to:Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Route "public://image.png" does not exist.")
FieldItemLists w ciąg znaków (którego nie mogę znaleźć)
url()chce trasy. Jak o url_from_path(node.field_image.0.entity.uri.value)?
url_from_path()wydaje się to generować: http://mywebsite.local/public%3A//image.pngwięc wydaje się, że jest to urlencoding i dołączanie dokładnej wartości do adresu

url(node.field_image.0.entity.uri)( istotny problem )