Your problem is easy explained, you are not in the folder of your bundle you are in the the web folder if you use asset()
in twig.
The path will be RootFolder/web
if you use asset
:
Store your images in the web folder e.g. in upload/images
{% for item in test %}
<img src="{{ asset("upload/images/") ~ item.thumbnail }} " alt="{{ item.alt }}" />
{% endfor %}
or if you do not upload new images and they are only for your template e.g. a logo,
run the command: assets:install
and change your code to:
{% for item in test %}
<img src="{{ asset("bundles/{acme}/images/") ~ item.thumbnail }} " alt="{{ item.alt }}" />
{% endfor %}
acme
have to be the name of url bundle in lowercase and without the Bundle
at the end.