diff --git a/layouts/shortcodes/responsive-img.html b/layouts/shortcodes/responsive-img.html new file mode 100644 index 0000000..6964da9 --- /dev/null +++ b/layouts/shortcodes/responsive-img.html @@ -0,0 +1,30 @@ +{{ $src := ( resources.Get ( .Get 0 ) ) }} + +{{ $tinyw := default "500" }} +{{ $smallw := default "800" }} +{{ $mediumw := default "1200" }} +{{ $largew := default "2400" }} + +{{ $tiny := $src.Resize (printf "%sx" $tinyw) }} +{{ $small := $src.Resize (printf "%sx" $smallw) }} +{{ $medium:= $src.Resize (printf "%sx" $mediumw) }} +{{ $large := $src.Resize (printf "%sx" $largew) }} + + \ No newline at end of file