In this particular case if I were you, I would just add those social buttons to My.Site/Resources/Public/images/social
and use them with resource view helper:
{f:uri.resource(path: 'images/social/fb.png', package: 'My.Site')}
It doesn't make sense to copy asset identifier from media browser and hardcode it in template. Those ids might be different in your colleague database, your client might remove this asset by accident and so on.
So I would suggest adding those social buttons (sprite maybe) to static resources of your package, create partial with all social buttons and use this partial in page/node templates where you need them.
If you really want to use one of media:image
or media:uri.image
view helpers, you need to pass asset object (not identifier) as an argument. Use for that node properties - add fbIcon, twitterIcon etc. with type: TYPO3\Media\Domain\Model\ImageInterface
to your node definition in NodeTypes.yaml
, then insert node and choose your icons from media browser (using inspector), then in your node template:
{namespace media=TYPO3\Media\ViewHelpers}
<ul>
<li><a href="#"><media:image image="{fbIcon}" alt="fb" />..
<li><a href="#"><media:image image="{twitterIcon}" alt="twitter" />..
I haven't use Neos for a while, so it might have changed a bit.. And of course you can create your own view helper which will accept asset id and using AssetRepository and ResourceManager you can return public uri to template.