Liquid Code for Logo and Image size

New Member
9 0 0

I am trying to override a theme's setting logo with the following code in header.liquid.

I have uploaded the asset files and named them correctly, but although I am putting this in liquid, it's not overriding. Also, scaling the image doesn't work, whether I put something like asset_img_url: '200x' or asset_img_url:'2x'.

Any thoughts?

My code is: 

<h1><a href="/"><img src="{{ 'hello-logo@2x.png' | asset_img_url:'2x' }}" alt="{{ }}" /></a></h1>

Not sure what I'm doing wrong here?

1890 0 385

There's a chance that there are multiple sections of code that include the logo.  For example, there might be a section of code to include the logo in the desktop header and another section of code to include the logo in the mobile menu.

If that doesn't help, you might want to share your shop or tell us the theme you're using.