diff --git a/config/_default/params.toml b/config/_default/params.toml
index db391cb7..21e4748f 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -12,6 +12,7 @@ autoSwitchAppearance = true
enableSearch = false
enableCodeCopy = false
enableImageLazyLoading = true
+enableImageWebp = true
# robots = ""
fingerprintAlgorithm = "sha256"
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index d828f120..41c7a5b0 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -12,6 +12,7 @@ autoSwitchAppearance = true
enableSearch = true
enableCodeCopy = true
enableImageLazyLoading = true
+enableImageWebp = true
# robots = ""
fingerprintAlgorithm = "sha256"
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index ac82a6aa..2e7a5b53 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,64 +1,20 @@
{{ $url := urls.Parse .Destination }}
{{ $altText := .Text }}
{{ $caption := .Title }}
-{{ $lazyLoad := $.Page.Site.Params.enableImageLazyLoading | default true }}
-{{ if findRE "^https?" $url.Scheme }}
-
-{{ else }}
- {{ $resource := "" }}
- {{ if $.Page.Resources.GetMatch ($url.String) }}
- {{ $resource = $.Page.Resources.GetMatch ($url.String) }}
- {{ else if resources.GetMatch ($url.String) }}
- {{ $resource = resources.Get ($url.String) }}
- {{ end }}
- {{ with $resource }}
-
- {{ else }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{ $class := "mx-auto my-0 rounded-md" }}
+
+{{ $file := $url.Path }}
+{{ $img := .Page.Resources.GetMatch $file }}
+{{- if and (not $img) .Page.File }}
+ {{ $path := path.Join .Page.File.Dir $file }}
+ {{ $img = resources.Get $path }}
+{{ end -}}
+
+
diff --git a/layouts/partials/picture.html b/layouts/partials/picture.html
new file mode 100644
index 00000000..4d5aa7e3
--- /dev/null
+++ b/layouts/partials/picture.html
@@ -0,0 +1,85 @@
+{{ $img := .img }}
+{{ $alt := .alt }}
+{{ $class := .class }}
+{{ $lazy := .lazy }}
+{{ $webp := .webp }}
+{{ $lqip := .lqip }}
+
+{{ with $img }}
+ {{ if (eq .MediaType.SubType "svg") }}
+ {{ $width := ""}}
+ {{ $height := ""}}
+ {{ $svgContent := .Content }}
+ {{ range (findRESubmatch `