# Image Caching

By default, a maximum of 60 images are cached for 1 year. The supported image extensions extensions are as follows:

```regex
/\.(ico|png|jpe?g|gif|svg|webp|bmp)$/
```

This can be changed using the next configuration options

<pre class="language-yaml" data-title="/config/packages/pwa.yaml" data-line-numbers><code class="lang-yaml">pwa:
<strong>    serviceworker:
</strong>        enabled: true
        src: "sw.js"
        workbox:
            image_cache:
                enabled: true
                max_age: 30 days
                max_entries: 200
                regex: '/\.(png|jpe?g|svg|webp)$/'
</code></pre>

{% hint style="info" %}
This cache is different from the Asset one as it corresponds to images that are not managed by Asset Mapper
{% endhint %}


---

# 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://pwa.spomky-labs.com/the-service-worker/workbox/image-caching.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.
