diff options
author | Ivan Boothe <git@rootwork.org> | 2022-05-17 23:47:56 +0300 |
---|---|---|
committer | Ivan Boothe <git@rootwork.org> | 2022-05-17 23:47:56 +0300 |
commit | a16cb00f07a777e35e5f751cfdfab5e123aa339e (patch) | |
tree | 502e724f8c130a7c911abe93c2bb58c1ada8f86c /layouts | |
parent | 7b8a2ac27c66be4852c2e5d7dd1d7d145f90007d (diff) |
ensure builds won't choke on broken images
Signed-off-by: Ivan Boothe <git@rootwork.org>
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-image.html | 2 | ||||
-rw-r--r-- | layouts/partials/image.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index bc18a77..3094c79 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -18,7 +18,7 @@ {{- if strings.HasPrefix $file "http" -}} {{- $scratch.Add "classes" " image_external" -}} {{- $image = resources.GetRemote $file -}} - {{- with $image.MediaType }} + {{- with $image }} {{- if eq $image.MediaType.MainType "image" -}} {{- if eq $image.MediaType.SubType "svg" -}} {{- $image = "" -}} diff --git a/layouts/partials/image.html b/layouts/partials/image.html index 3b10854..469b116 100644 --- a/layouts/partials/image.html +++ b/layouts/partials/image.html @@ -28,7 +28,7 @@ {{- if strings.HasPrefix $file "http" -}} {{- $scratch.Add "classes" " image_external" -}} {{- $image = resources.GetRemote $file -}} - {{- with $image.MediaType }} + {{- with $image }} {{- if eq $image.MediaType.MainType "image" -}} {{- if eq $image.MediaType.SubType "svg" -}} {{- $image = "" -}} |