How do I reference the 'publication image' in my theme code?

I’m currently building a header block for my site that’s based on the standard link card. The image used in the block currently references an image stored externally, but I was wondering whether there’s a way to pull in the publication image that’s set in the admin console?

I tried to post the code I have so far, but it’s rendering in this comment window as html :/ Not sure what that’s about sorry (I’m new to this!)

If you mean the publication cover, then yes:

{{#if @site.cover_image}}
  <img class="" src="{{img_url @site.cover_image}}"/>

Additionally, if you have different image sizes, you can reference those:

<img class="" src="{{img_url @site.cover_image size="s"}}"/>

Oops yes publication cover. This is perfect, thanks

P.S. love your work!

1 Like