mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
---
|
||||
title: Fit
|
||||
description: Applicable to images, returns an image resource downscaled to fit the given dimensions while maintaining aspect ratio.
|
||||
description: Applicable to images, returns an image resource downscaled to fit the given dimensions while maintaining aspect ratio.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/resource/Crop
|
||||
- methods/resource/Fill
|
||||
- methods/resource/Resize
|
||||
- methods/resource/Process
|
||||
- functions/images/Process
|
||||
returnType: images.ImageResource
|
||||
signatures: [RESOURCE.Fit SPEC]
|
||||
toc: true
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: images.ImageResource
|
||||
signatures: [RESOURCE.Fit SPEC]
|
||||
---
|
||||
|
||||
{{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
|
||||
|
||||
Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height.
|
||||
|
||||
```go-html-template
|
||||
@@ -25,9 +21,7 @@ Downscale an image to fit the given dimensions while maintaining aspect ratio. Y
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
{{% include "methods/resource/_common/global-page-remote-resources.md" %}}
|
||||
|
||||
{{% include "/methods/resource/_common/processing-spec.md" %}}
|
||||
{{% include "/_common/methods/resource/processing-spec.md" %}}
|
||||
|
||||
## Example
|
||||
|
||||
|
Reference in New Issue
Block a user