Skip to content

Commit

Permalink
Update image-processor.mdx (#1218)
Browse files Browse the repository at this point in the history
* Update image-processor.mdx

* Update image-processor.mdx

* Update src/content/docs/en/pages/main-menu/reference/build/edge-application/image-processor.mdx

Co-authored-by: Mariana Bellorín Aguilera <89138244+MarianaAguilera@users.noreply.github.com>

---------

Co-authored-by: Guilherme Afonso Oliveira <guilherme.oliveira@azion.com>
Co-authored-by: Mariana Bellorín Aguilera <89138244+MarianaAguilera@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent bba008e commit 9d65212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,11 @@ Therefore, the PNG image `http://yourdomain.com/image.png?ims=filters:format(gif
<p align="center">[![Image_Processor_1](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:format(gif))](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:format(gif))</p>

:::caution
To convert an image to WEBP, you must send the header `Accept: image/webp` in the request.
To convert an image to AVIF, you must send the header `Accept: image/avif` in the request.
:::

:::caution
By default, the Image Processor uses the WEBP format for automatic image conversion. To make the AVIF format the default format delivery format, you need to create a rule in the Rules Engine of the Edge Application filtering `Accept: image/avif`.

In the Rules Engine tab of the edge application, add or edit a Request rule for one or more image paths.
In the Criteria section, select the variable to indicate the path of the images in your source:

`If matches Accept: image/avif`

To convert an image to AVIF, you must send the header `Accept: image/avif` in the request.
To convert an image to WEBP, you must send the header `Accept: image/webp` in the request.
:::

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,11 @@ Portanto, a imagem PNG `http://yourdomain.com/image.png?ims=filters:format(gif)`
<p align="center">[![Image_Processor_1](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:format(gif))](/assets/docs/images/image-processor/Image_Processor_1.png?ims=filters:format(gif))</p>

:::caution
Para converter uma imagem em WEBP, você deve enviar o cabeçalho `Accept: image/webp` na requisição.
Para converter uma imagem em AVIF, você deve enviar o cabeçalho `Accept: image/avif` na requisição.
:::

:::caution
Por padrão, o Image Processor utiliza o formato WEBP para conversão automática das imagens. Para tornar o formato AVIF como padrão de entrega de formato, é necessário criar uma regra no Rules Engine no Edge Application filtrando o `Accept: image/avif`.

Na aba Rules Engine da edge application, adicione ou edite uma regra Request para um ou mais caminhos de imagem.
Na seção Criteria, selecione a variável para indicar o caminho das imagens na sua origem:

`If matches Accept: image/avif`

Para converter uma imagem em AVIF, você deve enviar o cabeçalho `Accept: image/avif` na requisição.
Para converter uma imagem em WEBP, você deve enviar o cabeçalho `Accept: image/webp` na requisição.
:::

---
Expand Down

0 comments on commit 9d65212

Please sign in to comment.