Skip to content

Instantly share code, notes, and snippets.

@bilalnaseer
Created September 8, 2021 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilalnaseer/7c47010ade89ffc6a9bdc0862c96b38f to your computer and use it in GitHub Desktop.
Save bilalnaseer/7c47010ade89ffc6a9bdc0862c96b38f to your computer and use it in GitHub Desktop.
Shopify Add SVG Logo
<a href="{{ routes.root_url }}" class="site-header__logo-image{% if section.settings.align_logo == 'center' %} site-header__logo-image--centered{% endif %}">
{% capture image_size %}{{ section.settings.logo_max_width | escape }}{% endcapture %}
<img src="{{ 'logo.svg' | asset_url }}"
alt="{{ shop.name }}"
style="max-width: {{ image_size }}px;">
</a>
@bilalnaseer
Copy link
Author

bilalnaseer commented Sep 8, 2021

Make sure the SVG logo which you uploaded has the same file name as the above code "logo.svg". Otherwise, you will have to change filename in code as well - line number 3

@MissRaccoon33
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment