diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index c16a6b2..520c9e8 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,28 +1,47 @@
+{{ if .Params.image }}
+ {{ if hasPrefix .Params.image "resource:" }}
+ {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
+ {{ .Scratch.Set "image" ($resource.Fill "800x418").Permalink }}
+ {{ else }}
+ {{ .Scratch.Set "image" .Params.image}}
+ {{ end }}
+{{ end }}
+
+{{ $image := .Scratch.Get "image" }}
+
+
+{{/* Twitter-specific tags */}}
-{{ if .Params.image }}
-
+
+{{ if $image }}
+
{{ end }}
+
+{{/* OpenGraph tags*/}}
-{{ if .Params.image }}
-
-{{ end }}
+{{ if $image }}
+
+{{ end }}
+
+
-{{ if .Params.image }}
-
+
+{{ if $image }}
+
{{ end }}
@@ -33,6 +52,7 @@
+
{{ range .AlternativeOutputFormats }}
{{ end }}