Global Image Variables? I have setup a global set for images i use across the site. I have one for seo - where I have images for a twitter card and Facebook image in my seo settings. There is only one image for each field ( so hoping to avoid using the array syntax )

Two questions:


I am not sure how to access the images uploaded into this global variable. My global set has a handle "seo" and the image's handle is "twittercard". This isn't working :

meta(name='twitter:image:', content='{{ image.getUrl('seo.twittercard') }}')
Is this the most efficient way to store images used globally across the site? ( via global image variables?)
seo.twittercard is an ElementCriteriaModel. To access the actual asset, you need to use seo.twittercard.first (or equivalently: seo.twittercard.first()).

However, you should always check that this exists before referencing it:

{% if seo.twittercard|length %}
  &lt;meta(name='twitter:image:', content='{{ seo.twittercard.first.getUrl() }}')&gt;
{% endif %}


And yes, this is a fine way to store images used globally across the site.