80dd7b067 theme: Fix border class in render-codeblock template 0d3fde6c9 content: Fix typo 23a4adb29 content: More site => project changes 9243e9f6b content: Rename site configuration to project configuration (phase 2) 330aa2249 content: Miscellaneous edits 25ce893be content: Clarify sort order with PAGE.Rotate b398506dc content: Various dimension improvements c54573d13 content: Use singular form in method section descriptions d9a95fe54 content: Improve description of PAGE.Rotate 154f30600 content: Fix link c71bd2776 content: Address Markdown linting error 72c88e68e content: Improve pages related to content dimensions b85afa645 content: Fix formatting 7aaca8947 content: More site-to-project changes 8e1579030 content: Update quick start guide f7ba1fde2 content: Make new-in into a note 8b9d51584 theme: Address TailwindCSS warnings 3a4c2a25c theme: Address Hugo v0.156.0 deprecations 4f1a2bd7b content: Improve glossary entries 21bcd23a6 content: Update glossary entry c72ef1116 content: Update quick start guide c0737ffab content: Add typography plugin to TailwindCSS example 80bcb868e content: Remove Site.AllPages from examples 2b9ba5831 content: Replace Page.Sites and Site.Sites with hugo.Sites 2cdcc2556 content: Remove outdated badges 5a4beb530 content: Replace Site.Data with hugo.Data de4651b5d content: Update glossary entry 2302825a7 content: Add hugo.Data and note other deprecations bac5da4b5 content: Add hugo.Sites and update the other Sites methods 0f7d99153 content: Add Site.IsDefault f888f33bb content: Update glossary entries 65311c2de content: Include the "build" subcommand where appropriate 4991320d2 content: Standard shell language code in info strings b16d9f162 theme: Style todo lists f121450c6 content: Update version references 5a81dd8c2 content: Update CLI documentation f3ae0ce86 content: Rename site configuration to project configuration (phase 1) 9c8327119 content: Miscellaneous edits fbff91e22 Update HUGO_VERSION to 0.156.0 2ec625ae8 content: Restore snap installation instructions fc8c246b8 content: Clarify module initialization git-subtree-dir: docs git-subtree-split: 80dd7b067c31c28b13c51f3ac4636890509a4bb7
5.8 KiB
_comment
| _comment |
|---|
| Do not remove front matter. |
Processing specification
The processing specification is a space-delimited, case-insensitive list containing one or more of the following options in any sequence:
- action
- Specify one of
crop,fill,fit, orresize. This is applicable to theProcessmethod and theimages.Processfilter. If you specify an action, you must also provide dimensions. - anchor
- The focal point used when cropping or filling an image. Valid options include
TopLeft,Top,TopRight,Left,Center,Right,BottomLeft,Bottom,BottomRight, orSmart. TheSmartoption utilizes thesmartcrop.jslibrary to identify the most interesting area of the image. This defaults to theanchorparameter in your project configuration. - background color
- The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB hexadecimal color. This defaults to the
bgColorparameter in your project configuration. - compression
- {{< new-in 0.153.5 />}}
- The encoding strategy used for the image. Options are
lossyorlossless. Note thatlosslessis only supported by the WebP format. This defaults to thecompressionparameter in your project configuration. - dimensions
- The dimensions of the resulting image, in pixels. The format is
WIDTHxHEIGHTwhereWIDTHandHEIGHTare whole numbers. When resizing an image, you may specify only the width (such as600x) or only the height (such asx400) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as600x400. - format
- The format of the resulting image. Valid options include
bmp,gif,jpeg,png,tiff, orwebp. This defaults to the format of the source image. - hint
- The encoding preset used when processing WebP images, equivalent to the
-presetflag for thecwebpCLI. Valid options includedrawing,icon,photo,picture, ortext. This defaults to thehintparameter in your project configuration.Value Example drawingHand or line drawing with high-contrast details iconSmall colorful image photoOutdoor photograph with natural lighting pictureIndoor photograph such as a portrait textImage that is primarily text - quality
- The visual fidelity of the image, applicable to JPEG and WebP formats when using
lossycompression. The format isqQUALITYwhereQUALITYis a whole number between1and100, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to thequalityparameter in your project configuration. - resampling filter
- The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include
box,lanczos,catmullRom,mitchellNetravali,linear, ornearestNeighbor. This defaults to theresampleFilterparameter in your project configuration.Filter Description boxSimple and fast averaging filter appropriate for downscaling lanczosHigh-quality resampling filter for photographic images yielding sharp results catmullRomSharp cubic filter that is faster than the Lanczos filter while providing similar results mitchellNetravaliCubic filter that produces smoother results with less ringing artifacts than CatmullRom linearBilinear resampling filter, produces smooth output, faster than cubic filters nearestNeighborFastest resampling filter, no antialiasing Refer to the source documentation for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
- rotation
- The number of whole degrees to rotate an image counter-clockwise. The format is
rDEGREESwhereDEGREESis a whole number. Hugo performs rotation before any other transformations, so your target dimensions and any anchor should refer to the image orientation after rotation. User90,r180, orr270for orthogonal rotations, or arbitrary angles such asr45. To rotate clockwise, use a negative number such asr-45. To automatically rotate an image based on its Exif orientation tag, use theimages.AutoOrientfilter instead of manual rotation.Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a background color in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the
bgColorparameter in your project configuration.