# AMP code for publication image?

**URL:** <https://forum.ghost.org/t/amp-code-for-publication-image/1178>\
**Category:** Themes\
**Created:** [May 6, 2018, 7:20pm UTC](https://forum.ghost.org/t/amp-code-for-publication-image/1178 "2018-05-06T19:20:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![em\_div](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/em_div/32/383_2.png) [@em\_div](https://forum.ghost.org/u/em_div)\
**Post date:** [May 6, 2018, 7:20pm UTC](https://forum.ghost.org/t/amp-code-for-publication-image/1178/1 "2018-05-06T19:20:02Z")

</div>

First, disclaimer, I’m bad at this.

So, I grabbed the default amp.hbs file and started playing around to get used to it. I’m trying to add the blog’s image to the header using the AMP image code. I don’t want to just link to an image uploaded, so it would reflect future changes.

Could someone give me an AMP HTML code line that I could use in the header using the handlebars {{@blog.logo}} code?

---

<div class="post-metadata">

**Author:** ![Aileen](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aileen/32/9846_2.png) [@Aileen](https://forum.ghost.org/u/Aileen)\
**Post date:** [May 7, 2018, 1:43am UTC](https://forum.ghost.org/t/amp-code-for-publication-image/1178/2 "2018-05-07T01:43:31Z")

</div>

Hey @em_div

did you see this:

> **[Ghost Handlebars Themes - Building a custom Ghost theme - Docs](https://ghost.org/docs/themes/)**
>
> Our handlebars theme templating framework works with the Ghost API to build flexible publishing websites. Get all the tools you need to start building your custom theme here!

You should be able to use it like this:

```auto
{{#if @blog.logo}}
    <amp-img src={{@blog.logo}} width="600" height="400" layout="responsive"></amp-img>
{{/if}}

```

---

<div class="post-metadata">

**Author:** ![em\_div](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/em_div/32/383_2.png) [@em\_div](https://forum.ghost.org/u/em_div)\
**Post date:** [May 7, 2018, 1:45am UTC](https://forum.ghost.org/t/amp-code-for-publication-image/1178/3 "2018-05-07T01:45:53Z")

</div>

I did see that. I didn’t format it properly, it seems. Is it required to use the IF?

---

<div class="post-metadata">

**Author:** ![Aileen](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aileen/32/9846_2.png) [@Aileen](https://forum.ghost.org/u/Aileen)\
**Post date:** [May 7, 2018, 1:50am UTC](https://forum.ghost.org/t/amp-code-for-publication-image/1178/4 "2018-05-07T01:50:12Z")

</div>

> [@em\_div](#):
>
> Is it required to use the IF?

It is not required, but a blog logo is not always present, so it’s a good practice using a conditional. Will also make it easier to use different classes in your CSS. But totally up to you.
