You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.3 KiB

authors categories description tags title weight
will-faught
paige
shortcodes
Demonstration of the Paige image shortcode.
figures
images
Image Shortcode 40

Paige provides a paige/image shortcode for displaying an image.

Alt parameter

Code:

{{</* paige/image alt="Landscape" src="landscape.webp" */>}}

Result:

{{< paige/image alt="Landscape" src="landscape.webp" >}}

Height parameter

Code:

{{</* paige/image height="10rem" src="landscape.webp" */>}}

Result:

{{< paige/image height="10rem" src="landscape.webp" >}}

Code:

{{</* paige/image link="https://github.com/willfaught/paige" src="landscape.webp" */>}}

Result:

{{< paige/image link="https://github.com/willfaught/paige" src="landscape.webp" >}}

Maxheight parameter

Code:

{{</* paige/image maxheight="10rem" src="landscape.webp" */>}}

Result:

{{< paige/image maxheight="10rem" src="landscape.webp" >}}

Maxwidth parameter

Code:

{{</* paige/image maxwidth="10rem" src="landscape.webp" */>}}

Result:

{{< paige/image maxwidth="10rem" src="landscape.webp" >}}

Method and options parameters

Code:

{{</* paige/image link="https://github.com/willfaught/paige" method="resize" options="550x webp picture Lanczos" src="landscape.webp" */>}}

Result:

{{< paige/image link="https://github.com/willfaught/paige" method="resize" options="550x webp picture Lanczos" src="landscape.webp" >}}

Src parameter

Code:

{{</* paige/image src="landscape.webp" */>}}

Result:

{{< paige/image src="landscape.webp" >}}

Title parameter

Code:

{{</* paige/image src="landscape.webp" title="Landscape" */>}}

Result:

{{< paige/image src="landscape.webp" title="Landscape" >}}

Width parameter

Code:

{{</* paige/image src="landscape.webp" width="50%" */>}}

Result:

{{< paige/image src="landscape.webp" width="50%" >}}

Figure

Code:

{{</* paige/figure caption="Landscape" */>}}
{{</* paige/image src="landscape.webp" */>}}
{{</* /paige/figure */>}}

Result:

{{< paige/figure caption="Landscape" >}} {{< paige/image src="landscape.webp" >}} {{< /paige/figure >}}