Browse Source

increase image quality

master
Alexander Avery 2 years ago
parent
commit
82431b7d39
  1. 20
      layouts/partials/responsive-image.html

20
layouts/partials/responsive-image.html

@ -2,12 +2,12 @@
<img class="{{ .class | default "fill-wh"}}"
{{ with resources.Get .context.Params.featured.url }}
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "420x q50").RelPermalink }} 420w,
{{ (.Resize "700x q65").RelPermalink }} 700w,
{{ (.Resize "1200x q65").RelPermalink }} 1200w"
sizes="(max-width: 400px) 320vw,
(max-width: 1000px) 600vw,
1200vw"
sizes="(max-width: 400px) 420px,
(max-width: 1000px) 700px,
1200px"
src="{{ .RelPermalink }}"
{{ end }}
alt="{{ .context.Params.featured.alt }}"
@ -16,12 +16,12 @@
<img class="{{ .class | default "fill-wh"}}"
{{ with .context.Resources.GetMatch .context.Params.featured.url }}
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "420x q50").RelPermalink }} 420w,
{{ (.Resize "700x q65").RelPermalink }} 700w,
{{ (.Resize "1200x q65").RelPermalink }} 1200w"
sizes="(max-width: 400px) 320vw,
(max-width: 1000px) 600vw,
1200vw"
sizes="(max-width: 400px) 420px,
(max-width: 1000px) 700px,
1200px"
src="{{ .RelPermalink }}"
alt="{{ .Params.alt }}"
{{ end }}

Loading…
Cancel
Save