Image instead of text as logo (Antimatter)?

Is there a way to use a image instead of the site-title as logo in Antimatter-theme?

Edit the templates/partials/base.html.twig file. That is where the text is being output for the logo, simply change it to an image.

Also check this post: http://getgrav.org/forum#!/general:image-logo

I´m getting closer! :slight_smile:

Whilst this

is working fine, this

{{ pages.find('/images').media['logo.jpg'].manpulations.html %}

gives me a twig syntax-error. I thought there was a } missing, but when I added it it does not work either.

{{ pages.find('/images').media['logo.jpg'].manpulations.html %}}

Error

Please put your code between backticks (`) otherwise characters get stripped out. I can’t really tell what your code is without it.

Sorry, so what you wrote in the post linked above

<h3><a href="{{ base_url_relative}}"><img src="{{ base_url_relative }}/user/images/logo.png" /></a></h3>

is working but not responsive. The second, which should be resonsive, gives the syntax-error:

<h3><a href="{{ base_url_relative }}">{{ pages.find('/images').media['logo.png'].manpulations.html %}</a></h3>

What error?

I added a screenshot on my last link named “error”.

do you actually have the word manipulations in the output? that’s not valid.

You could have none:

<h3><a href="{{ base_url_relative }}">{{ pages.find('/images').media['logo.png'].html %}</a></h3>

or some valid manipulations such as:

<h3><a href="{{ base_url_relative }}">{{ pages.find('/images').media['logo.png'].cropResize(300,300).html %}</a></h3>

These are documented in the media docs.

Doesn`t work, it gives me a “Unexpected “}” in “partials/base.html.twig” at line 44”

Oh typos on my part…

should be }} to close not %}. They need to match the opening tags.

Yeah! THIS worked! Thanks a lot! Even if I have to learn a lot, I love GRAV! :slight_smile:

One last thing, I`ve found out. With your last code provided, the link of the logo is always to the current page but not the home page. I guess the base_url_relative has something to do with, but when I change this to base_url == ‘’ ? ‘/’ : base_url it gives a error.

The Antimatter theme has:

<a href="{{ base_url == '' ? '/' : base_url }}">...</a>

Thanks, worked. I use now the following code
<a href="{{ base_url == '' ? '/' : base_url }}"><img src="user/pages/images/logo.png" /></a>
and I`m happy with it.

This last code worked for me too. I had to resize the logo to 60pixels in height to fit in the heading.