# Optipress

Different images compressed with the same compression parameters may result in different perceptive quality. Moreover, the same image in different sizes may require different compression strategies to achieve maximum size gain without visible quality loss.

To overcome this, you can use our **Optipress** JPEG compression algorithm.

* Optipress finds out the best JPG compression approach by analyzing specific image features and current compression parameters.
* A **Machine Learning** model determines the best compression strategy for this image.
* Quality is then evaluated based on a simulation model of the Human Visual System to achieve optimum compression without perceptive quality deterioration.

By using Optipress, you can get the most out of the JPEG compression format.

{% hint style="info" %}
Optipress achieves the best results when re-compressing JPEG files and when the image quality is crucial.
{% endhint %}

## Usage

| <mark style="color:green;">**optipress=1**</mark> | most conservative setting; image quality is prioritised  |
| ------------------------------------------------- | -------------------------------------------------------- |
| <mark style="color:green;">**optipress=2**</mark> | balanced setting                                         |
| <mark style="color:green;">**optipress=3**</mark> | most aggressive setting; optimised for smaller file size |

{% hint style="info" %}
Images created by Optipress fully comply with baseline JPEG specifications and are compatible with all JPEG encoders.
{% endhint %}

## Examples

| Preview                          | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](/files/PN8IMfOSgVlPo91cEB8b) | <p>q=85, 543 kB:<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/paris.jpg?force_format=jpeg&#x26;q=85">/samples.scaleflex.com/paris.jpg?<mark style="color:green;"><strong>force\_format=jpeg</strong></mark>&<mark style="color:green;"><strong>q=85</strong></mark></a><br><br>optipress=3, 347 kB:<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/paris.jpg?force_format=jpeg&#x26;optipress=3">/samples.scaleflex.com/paris.jpg?<mark style="color:green;"><strong>force\_format=jpeg</strong></mark>&<mark style="color:green;"><strong>optipress=3</strong></mark></a></p> |
| ![](/files/xlyaxzlhKptdxbvfFT4z) | <p>q=85, 246 kB:<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/boat.jpg?force_format=jpeg&#x26;q=85">/samples.scaleflex.com/boat.jpg?<mark style="color:green;"><strong>force\_format=jpeg</strong></mark>&<mark style="color:green;"><strong>q=85</strong></mark></a><br><br>optipress=3, 150 kB:<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/boat.jpg?force_format=jpeg&#x26;optipress=3">/samples.scaleflex.com/boat.jpg?<mark style="color:green;"><strong>force\_format=jpeg</strong></mark>&<mark style="color:green;"><strong>optipress=3</strong></mark></a></p>     |


---

# Agent Instructions: 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:

```
GET https://docs.cloudimage.io/transformations/image-compression/optipress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
