1

This question already has an answer here:

This is the code I used in Drupal 7.

            <a href="<?php print $base_path ?>" title="<?php print t('Home') ?>">
                <img src="<?php print $logo ?>" alt="<?php print t('Home') ?>" />
            </a>

This is the code I am using for Drupal 8.

           <a href="{{ base_path }}" title="{{ 'Home'|t }}">      
    <span>{{ logopath }}</span>
                <img src="{{logo}}" alt="{{ 'Home'|t }}" alt="T.M. Patel International School"/>
            </a>

If I upload the logo, it doesn't display. What should I do now?

marked as duplicate by No Sssweat, kiamlaluno May 27 '16 at 6:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

This Link might be helpful : http://www.lohmeyer.rocks/blog/2015/01/14/00187-print-your-themes-logo-path-drupal-8-twig.

I think you should define the logo path variable first into template.tpl in MyTheme_preprocess_page function.

One More thing you are trying to use {{logopath}} in 'span' tag and into 'src' its {{logo}}.

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