Skip to content

Commit

Permalink
Add docs for the new auto option in image tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Sep 12, 2024
1 parent 8a92af6 commit e136fde
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,25 @@ You can customize the defaults of this tag's attributes via the (link: docs/refe
```kirbytext
(\image: myawesomepicture.jpg width: 500 height: 300)
```
<since v="4.4.0">
Width and height can also be set to auto, which will automatically be replaced by the actual image dimensions.

```kirbytext
(\image: cat.jpg width: auto height: auto)
```

This behaviour can also be set as global default for all image kirbytags in your config file.

```php
// config.php
'kirbytext' => [
'image' => [
'width' => 'auto',
'height' => 'auto',
]
];
```
</since>

<since v="4.0.0">
### Image with `srcset` with absolut sizes
Expand Down

0 comments on commit e136fde

Please sign in to comment.