How to Change Header Logo Image URL Magento 2.1. So I click the header logo to go to another website.

  • You are asking about favicon ? Can you elaborate your question? – Venu Joginpally Dec 12 '16 at 12:29
  • Why you want to change header logo URL? elaborate more. – chirag Dec 12 '16 at 12:42
  • So I click the header logo to go to another website. – bob bar Dec 12 '16 at 13:35

You have to override vendor/magento/module-theme/view/frontend/templates/html/header/logo.phtml in your theme.

Your theme path is like : app/design/frontend/{vendor}/{theme}/Magento_Theme/templates/html/header/logo.phtml

enter image description here

You can add your URL here.

| improve this answer | |
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="header-wrapper">
            <block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
                    <argument name="logo_src" xsi:type="string">images/logo.png</argument>

If needs use "theme" url:





and change

src="<?= $block->getLogoSrc() ?>"


src="<?= $block->getViewFileUrl($block->getLogoSrc()) ?>"

| improve this answer | |
Content -> Design -> Configuration-> <your theme> -> Header settings -> logo
| improve this answer | |
  • 1
    this will change logo image. not URL of the image. thank you – bob bar Dec 12 '16 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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