0

I'm a typo newbie, and was wondering, how I can make the following code work in my HTML Template file:

<img src="EXT:extension-name/Resources/Public/Images/Logo/logo-white.png" alt="logo.png">

Looking forward to your anwers, thanks.

1 Answer 1

3

This cannot be done in an HTML file but within a Fluid template file you should use the uri.resource viewhelper:

<img src="{f:uri.resource(path: 'Images/Logo/logo-white.png')}" alt="Actual explanation of the logo content">

If used within an Extbase plugin there is nothing else to do.

For templates using the FLUIDTEMPLATE content object you'll need to set the extension name, for example with an extensionName: 'MyExt' as argument:

<img src="{f:uri.resource(path: 'Images/Logo/logo-white.png', extensionName: 'MyExt')}" alt="Actual explanation of the logo content">

Alternatively use controllerExtensionName in your TypoScript setup.

Sign up to request clarification or add additional context in comments.

2 Comments

Like that? <img src="{f:uri.extensionName: 'ext-name'.resource(path: 'Public/Images/Logo/logo-white.png')}" alt="Actual explanation of the logo content">
Uups, just learned it from here: viewhelper

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.