diff --git a/README.md b/README.md index dc20dfce..02c26644 100644 --- a/README.md +++ b/README.md @@ -518,11 +518,11 @@ Parameters:
align
Optional. String. Cross axis alignment. Must be baseline, center, end, start, or stretch.
breakpoints
-
Optional. Boolean. Whether to generate copies of the image sized to each Bootstrap breakpoint. Must not use with densities.
+
Optional. Boolean. Whether to generate copies of the image sized to each Bootstrap breakpoint. Must not use with densities. Only applies to raster images.
class
Optional. String. Image class. Merged with implementation.
densities
-
Optional. String. Float numbers suffixed with an "x", delimited by spaces. The pixel densities of the image to generate. There must be at least two. The largest density matches the original image. Examples are 1x 2x, 1x 1.5x 2x 2.5x 3x, and 0.5x 1.33x 6x 10x. Must not use with breakpoints.
+
Optional. String. Float numbers suffixed with an "x", delimited by spaces. The pixel densities of the image to generate. There must be at least two. The largest density matches the original image. Examples are 1x 2x, 1x 1.5x 2x 2.5x 3x, and 0.5x 1.33x 6x 10x. Must not use with breakpoints. Only applies to raster images.
fetchpriority
Optional. String. Must be high or low.
height
@@ -532,7 +532,7 @@ Parameters:
justify
Optional. String. Main axis space distribution. Must be around, between, center, end, evenly, or start.
linked
-
Optional. String. Hugo image processing methods and options, mixed together, for the linked image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is unprocessed, it is unprocessed. If it is default, the default options are used.
+
Optional. String. Hugo image processing methods and options, mixed together, for the linked image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is unprocessed, it is unprocessed. If it is default, the default options are used. Must be unprocessed for raster images.
loading
Optional. String. Must be eager (default) or lazy.
maxheight
@@ -540,7 +540,7 @@ Parameters:
maxwidth
Optional. String. CSS value. Maximum image width.
process
-
Optional. String. Hugo image processing methods and options, mixed together, for the displayed image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is default, the default options are used.
+
Optional. String. Hugo image processing methods and options, mixed together, for the displayed image. If no method is specified, resize is used. If no image dimensions are specified, the originals are used. If it is default, the default options are used. Only applies to raster images.
style
Optional. String. CSS. Image style. Merged with implementation.
type
diff --git a/layouts/partials/paige/image.html b/layouts/partials/paige/image.html index 11efaf0a..510f9af2 100644 --- a/layouts/partials/paige/image.html +++ b/layouts/partials/paige/image.html @@ -71,7 +71,9 @@ {{ $resource = partial "paige/func-resource.html" (dict "page" $page "url" $src) }} {{ end }} -{{ if $resource }} +{{ $raster := ne $resource.MediaType.SubType "svg" }} + +{{ if and $resource $raster }} {{ $method := "" }} {{ $options := slice }} {{ $quality := "" }} @@ -220,6 +222,8 @@ {{ end }} {{ end }} {{ end }} +{{ else if $resource }} + {{ $src = $resource.Permalink }} {{ else }} {{ $src = absLangURL $src }} {{ end }}