# Download original version when using Fastly image optimizer

**URL:** <https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [September 8, 2022, 6:08am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673 "2022-09-08T06:08:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonaskihlstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonaskihlstrom/32/130_2.png) [@jonaskihlstrom](https://forum.litium.com/u/jonaskihlstrom)\
**Post date:** [September 8, 2022, 6:08am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/1 "2022-09-08T06:08:18Z")

</div>

Hi,

The customer would like to download the original image from back office media area. The problem is that when they download the image Fastly is returning the webP version.

When I look at the Fastly documentation it says that adding ?format=jpeg should do the trick but that doesn’t do anything that I can see.

Litium version: _7.7.9_

---

<div class="post-metadata">

**Author:** ![utku](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/utku/32/62_2.png) [@utku](https://forum.litium.com/u/utku)\
**Post date:** [September 8, 2022, 2:18pm UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/2 "2022-09-08T14:18:54Z")

</div>

Hi, are you using Image Optimizer in Fastly?

---

<div class="post-metadata">

**Author:** ![jonaskihlstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonaskihlstrom/32/130_2.png) [@jonaskihlstrom](https://forum.litium.com/u/jonaskihlstrom)\
**Post date:** [September 9, 2022, 1:45pm UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/3 "2022-09-09T13:45:12Z")

</div>

Yes, that correct.

---

<div class="post-metadata">

**Author:** ![jonaskihlstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonaskihlstrom/32/130_2.png) [@jonaskihlstrom](https://forum.litium.com/u/jonaskihlstrom)\
**Post date:** [September 14, 2022, 10:18am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/4 "2022-09-14T10:18:52Z")

</div>

Any thoughts on how to solve it?

---

<div class="post-metadata">

**Author:** ![utku](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/utku/32/62_2.png) [@utku](https://forum.litium.com/u/utku)\
**Post date:** [September 16, 2022, 11:05am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/5 "2022-09-16T11:05:27Z")

</div>

Hi again,  
Faslty ImageOptimization has to be configured so that it does not optimize the backoffice downloads. Do you have access to customers Fastly environment?

---

<div class="post-metadata">

**Author:** ![jonaskihlstrom](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonaskihlstrom/32/130_2.png) [@jonaskihlstrom](https://forum.litium.com/u/jonaskihlstrom)\
**Post date:** [September 21, 2022, 6:41am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/6 "2022-09-21T06:41:50Z")

</div>

I will paste your answer here so you can change this to solved.

In Fastly admin there is a file called **litium\_recv.vcl** and a line that looks like this:

```auto
if (req.url.ext ~ "(?i)^(?:gif|png|jpe?g|webp)$" && req.http.X-UA-Device != "bot")
    set req.http.x-fastly-imageopto-api = "fastly";
}

```

You need to change it to this:

```auto
if (req.url.ext ~ "(?i)^(?:gif|png|jpe?g|webp)$" && req.http.X-UA-Device != "bot" && req.url.qs != "forceDownload=true") {
   set req.http.x-fastly-imageopto-api = "fastly";
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [October 19, 2022, 6:41am UTC](https://forum.litium.com/t/download-original-version-when-using-fastly-image-optimizer/2673/7 "2022-10-19T06:41:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
