diff --git a/README.md b/README.md
index 82a1ec3d..4fe5a6d6 100644
--- a/README.md
+++ b/README.md
@@ -438,6 +438,8 @@ The `paige/image` shortcode provides a figure with an image.
alt="My alt" >}}
height="10rem"
link="https://github.com/willfaught/paige"
+ maxheight="10rem"
+ maxwidth="10rem"
method="resize"
options="550x webp picture Lanczos"
raw=false
@@ -458,6 +460,10 @@ Parameters:
Optional. String. CSS value. Image height.
link
Optional. String. URL. Image link.
+ maxheight
+ Optional. String. CSS value. Image maximum height.
+ maxwidth
+ Optional. String. CSS value. Image maximum width.
method
Optional. String. Hugo image processing method. Must be crop
, fill
, fit
, or resize
. Must be specified with options
. See the methods.
options
diff --git a/exampleSite/content/shortcodes/image.md b/exampleSite/content/shortcodes/image.md
index e072a6fb..4d32a471 100644
--- a/exampleSite/content/shortcodes/image.md
+++ b/exampleSite/content/shortcodes/image.md
@@ -47,6 +47,30 @@ Result:
{{< paige/image link="https://github.com/willfaught/paige" src="landscape.webp" >}}
+## Maxheight parameter
+
+Code:
+
+```go-text-template
+{{* paige/image maxheight="10rem" src="landscape.webp" */>}}
+```
+
+Result:
+
+{{< paige/image maxheight="10rem" src="landscape.webp" >}}
+
+## Maxwidth parameter
+
+Code:
+
+```go-text-template
+{{* paige/image maxwidth="10rem" src="landscape.webp" */>}}
+```
+
+Result:
+
+{{< paige/image maxwidth="10rem" src="landscape.webp" >}}
+
## Method and options parameters
Code:
diff --git a/layouts/shortcodes/paige/image.html b/layouts/shortcodes/paige/image.html
index 9979ac67..b80a8197 100644
--- a/layouts/shortcodes/paige/image.html
+++ b/layouts/shortcodes/paige/image.html
@@ -1,6 +1,8 @@
{{ $alt := .Get "alt" }}
{{ $link := .Get "link" }}
{{ $height := .Get "height" }}
+{{ $maxheight := .Get "maxheight" }}
+{{ $maxwidth := .Get "maxwidth" }}
{{ $method := .Get "method" }}
{{ $options := .Get "options" }}
{{ $raw := .Get "raw" }}
@@ -12,6 +14,8 @@
"alt" $alt
"class" "img-fluid"
"height" $height
+ "maxheight" $maxheight
+ "maxwidth" $maxwidth
"method" $method
"options" $options
"page" .Page