> For the complete documentation index, see [llms.txt](https://docs.sirplugin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sirplugin.com/features/cropping-mode.md).

# Cropping Mode

{% hint style="info" %}
This is an experimental setting that may be subject to change in future updates.

To enable this setting, add this code snippet to your theme functions.php file:\
\
`add_filter('enable_experimental_features/crop_mode', '__return_true' );`
{% endhint %}

### Resize without cropping (default)

This option will resize the image to fit within the selected size such as a "WooCommerce thumbnail" while maintaining the aspect ratio of the original image. This option will not cut off any parts of the image, so if the original image's aspect ratio is different from the selected size, there may be white space around the edges of the image. For example, if you have a rectangular image and you select a square size, the image will be resized to fit within the square size while keeping the rectangular shape, which means there will be white space on the top and bottom of the square.

### Resize with cropping

This option will resize the image to fit within the selected size such as a "WooCommerce thumbnail") by cutting off parts of the image that exceed the selected size, while maintaining the aspect ratio of the original image. This means that parts of the original image may be cut off to make the image fit within the selected size. For example, if you have a rectangular image and you select a square size, the image will be resized and the parts of the image that exceed the square size will be cropped off, which means parts of the image on the left and right sides will be cut off.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sirplugin.com/features/cropping-mode.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
