Revert "Set height and width specifically on img tag"

This reverts commit be12afb50d.

It causes issues with aspect ratio when the raw width of the image is
wider than the width in CSS pixels allowed by the body max-width.

Not reverting the refactor that removes {{ $img = . }} because I don't
know why that was there and will see if it works fine with it still
removed.
This commit is contained in:
2025-07-03 20:15:17 -05:00
parent be12afb50d
commit cc7cec07df

View File

@ -8,7 +8,7 @@
{{ with index . "src" }} {{ with index . "src" }}
{{ if eq .MediaType.MainType "image" }} {{ if eq .MediaType.MainType "image" }}
<img src="{{ .Permalink }}" alt="{{ .Title }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy" /> <img src="{{ .Permalink }}" alt="{{ .Title }}" loading="lazy" />
{{ else if eq .MediaType.MainType "video" }} {{ else if eq .MediaType.MainType "video" }}
<video controls preload="metadata"> <video controls preload="metadata">
<source src="{{ .Permalink }}" alt="{{ .Title }}"> <source src="{{ .Permalink }}" alt="{{ .Title }}">