seo icon indicating copy to clipboard operation
seo copied to clipboard

Feature request : default fallback image

Open ankedsgn opened this issue 7 years ago • 2 comments

Wishlist! It would be lovely if there would be a default image possibility. So you can, for instance, add the logo of the company in the OG tags when no image is present in the shared page.

The og:image is one of the four required properties (title, type, url and image) sauce

default:
    title: ""
    description: ""
    ogtype: "website" 
    image: "foo.jpg"

preferably like this, in the config.

Thx!


used version: 1.0.7

ankedsgn avatar Jan 24 '18 16:01 ankedsgn

+1 👍

sbonardt avatar Apr 04 '18 14:04 sbonardt

@anketwokings

If you add a custom _metatags.twig to your theme folder, and add an {% else %} to the OG:image part you have yourself a workaround:

{% if image|default() is not empty %}
        <meta property="og:image" content="{{ image }}" />
{% else %}
        <meta property="og:image" content="/path/to/the/default/image.jpg" />
{% endif 
%}

sbonardt avatar Apr 04 '18 15:04 sbonardt