diff --git a/layouts/partials/image.html b/layouts/partials/image.html
new file mode 100644
index 00000000..d6a747f5
--- /dev/null
+++ b/layouts/partials/image.html
@@ -0,0 +1,95 @@
+
+{{ if .caption }}
+
+{{ end }}
+
+{{ if (strings.HasPrefix .src "http") }}
+
+
+{{ else if (strings.HasPrefix .src "/") }}
+
+ {{ $imageConfig := imageConfig (path.Join "static" .src) }}
+
+{{ else }}
+ {{ $src := .src }}
+ {{ if strings.HasPrefix $src "./" }}
+
+ {{ $src = substr $src 2 }}
+ {{ end }}
+
+ {{ $images := .page.Resources.ByType "image" }}
+ {{ $image := $images.GetMatch $src }}
+ {{ if eq $image.MediaType.SubType "svg" }}
+
+
+ {{ else }}
+
+ {{ $minWidth := .page.Site.Params.imageResize.min | default 300 }}
+ {{ $maxWidth := .page.Site.Params.imageResize.max | default 700 }}
+ {{ $increment := .page.Site.Params.imageResize.increment | default 200 }}
+ {{ $widths := seq $minWidth $increment $maxWidth }}
+ {{ if lt $image.Width $maxWidth }}
+ {{ $widths = $widths | append $image.Width }}
+ {{ end }}
+ {{ $widthsCount := len $widths }}
+
+ {{ $sizes := slice }}
+ {{ $srcSet := slice }}
+ {{ $webpSrcSet := slice }}
+ {{ range $i, $width := $widths }}
+ {{ if ge $image.Width $width }}
+ {{ if eq $i (sub $widthsCount 1) }}
+ {{ $sizes = $sizes | append (printf "%dpx" $width) }}
+ {{ else }}
+ {{ $maxWidth := (add $width (sub $increment 1)) }}
+ {{ $sizes = $sizes | append (printf "(max-width: %dpx) %dpx" $maxWidth $width) }}
+ {{ end }}
+ {{ $resized := $image.Resize (printf "%dx" $width) }}
+ {{ $srcSet = $srcSet | append (printf "%s %dw" $resized.RelPermalink $resized.Width) }}
+ {{ if not (eq "webp" $image.MediaType.SubType) }}
+
+ {{ $webp := $image.Resize (printf "%dx webp" $width) }}
+ {{ $webpSrcSet = $webpSrcSet | append (printf "%s %dw" $webp.RelPermalink $webp.Width) }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+
+
+
+
+
+
+ {{ end }}
+{{ end }}
+
+
+
+{{ if .caption }}
+ {{ .page.RenderString .caption }}
+
+{{ end }}
\ No newline at end of file