<p>Although this issue turned out to be the result of a bug, for the record you can bypass Craft's image processing step by manually uploading an image directly to the assets folder on the server (ie. via FTP rather than Craft) and then selecting "Update Asset Indexes" in Craft's admin panel (under "Settings"). This allowed me to get the problem image up and working.</p>

<p>Obviously for most images it's much better - more secure, and more convenient - to upload them via Craft, but if all else fails this may be useful to know.</p>

CC BY-SA 3.0
2016-05-03T11:07:44.933Z
2016-05-03T11:07:44.933Z
Nick F
<p>When you upload an image to Craft, the image is automatically “cleansed” using the same basic process that Craft uses to create image transforms. That happens to ensure that there are no malicious scripts hidden in the images, and it’s not something you can disable.</p>

CC BY-SA 3.0
2017-06-21T15:51:50.073Z
Hi Brandon,
I know this is an old comment but we have an issue with our optimised images growing excessively when uploaded due to the call in BaseAssetSourceType to craft()->images->cleanImage() method.

Whilst I understand I can FTP files up and reindex them, it is not an idea solution for a client. Most of our sites do not accept public uploads, so it would be really nice to have a config option wrapping this call, so that we can instruct the client to optimise the images before upload and the filesize be maintained. Ex. 380KB png, optimised down to 155KB, upload in craft becomes 400KB
Jay
CC BY-SA 3.0
2017-06-22T01:45:19.543Z
@jay can you write into support@craftcms.com with details of your environment (PHP version, GD/Imagick version)  and a sample image you're having that issue with?
Brandon Kelly
CC BY-SA 3.0
2016-04-25T12:28:00.673Z
2016-04-25T12:28:00.673Z
Brandon Kelly
<p>I'm having an issue where Craft seems to change (significantly slowing down) the framerate of animated GIF assets on upload (this doesn't seem to be an image transform problem: if I add the file as an asset in Craft, and then open the uploaded version of the file, the framerate has already changed).</p>

<p>The server is on the latest version of php-imagick (3.1.2) and ImageMagick (6.6.7-10) that are currently available for the version of Ubuntu that we're running (14.04 LTS)</p>

<p>So my question is: is there any way (config setting or similar) of preventing Craft from messing with uploaded GIFs in this way?</p>

CC BY-SA 3.0
2016-04-25T11:10:14.490Z
If you browse to the un-transformed asset directly, does the browser display it at the correct frame rate? e.g. http://domain.com/assets/gifs/file-name.gif
Matt P
CC BY-SA 3.0
2016-04-25T11:21:13.627Z
No. That was what I meant by "the uploaded version of the file". Basically, adding the file to Craft as an asset seems to be the step at which the problem happens.
Nick F
CC BY-SA 3.0
2016-04-25T11:25:17.730Z
Have you seen this thread: http://superuser.com/questions/569924/why-is-the-gif-i-created-so-slow ?
Matt P
CC BY-SA 3.0
2016-04-25T11:50:35.647Z
No, I hadn't, but I'm not sure what from that I can apply to this problem... Can you be more specific? The original GIF runs at the correct framerate in the browser, so it's presumably not a browser issue or an issue with the original GIF: Craft must be doing something to the GIF. It seems to me that the solution to the problem will be getting Craft to not do that thing...
Nick F
CC BY-SA 3.0
2016-04-25T12:29:43.103Z
@NickF Posted an answer to your main question, but the different framerate is a bug. Can you please send your image to support@craftcms.com along with a link to this question, so we can try to fix this?
Brandon Kelly
CC BY-SA 3.0
2016-04-25T15:09:15.080Z
@BrandonKelly Ah, that makes sense. I've just sent the image over. Thanks for the quick response - much appreciated!
Nick F
CC BY-SA 3.0
2016-05-03T16:49:57.820Z
Bug fixed in https://craftcms.com/changelog#build2783
Brad Bell
<assets><image><gif>
Is there any way to prevent Craft from doing anything with uploaded GIF assets?
# Is there any way to prevent Craft from doing anything with uploaded GIF assets?

(Asked by: username_0 on 2016-04-25)

I'm having an issue where Craft seems to change (significantly slowing down) the framerate of animated GIF assets on upload (this doesn't seem to be an image transform problem: if I add the file as an asset in Craft, and then open the uploaded version of the file, the framerate has already changed).

The server is on the latest version of php-imagick (3.1.2) and ImageMagick (6.6.7-10) that are currently available for the version of Ubuntu that we're running (14.04 LTS)

So my question is: is there any way (config setting or similar) of preventing Craft from messing with uploaded GIFs in this way?

**Tags:** assets, image, gif

> **Comments:**
> **username_1**: If you browse to the un-transformed asset directly, does the browser display it at the correct frame rate? e.g. http://domain.com/assets/gifs/file-name.gif  
> **username_0**: No. That was what I meant by "the uploaded version of the file". Basically, adding the file to Craft as an asset seems to be the step at which the problem happens.  
> **username_1**: Have you seen this thread: http://superuser.com/questions/569924/why-is-the-gif-i-created-so-slow ?  
> **username_0**: No, I hadn't, but I'm not sure what from that I can apply to this problem... Can you be more specific? The original GIF runs at the correct framerate in the browser, so it's presumably not a browser issue or an issue with the original GIF: Craft must be doing something to the GIF. It seems to me that the solution to the problem will be getting Craft to not do that thing...  
> **username_2**: @NickF Posted an answer to your main question, but the different framerate is a bug. Can you please send your image to support@craftcms.com along with a link to this question, so we can try to fix this?  
> **username_0**: @BrandonKelly Ah, that makes sense. I've just sent the image over. Thanks for the quick response - much appreciated!  
> **username_3**: Bug fixed in https://craftcms.com/changelog#build2783  

---

## 2 answers

### Answer by username_0 on 2016-05-03. Score: 3 | Accepted answer

Although this issue turned out to be the result of a bug, for the record you can bypass Craft's image processing step by manually uploading an image directly to the assets folder on the server (ie. via FTP rather than Craft) and then selecting "Update Asset Indexes" in Craft's admin panel (under "Settings"). This allowed me to get the problem image up and working.

Obviously for most images it's much better - more secure, and more convenient - to upload them via Craft, but if all else fails this may be useful to know.


---

### Answer by username_2 on 2016-04-25. Score: 4

When you upload an image to Craft, the image is automatically “cleansed” using the same basic process that Craft uses to create image transforms. That happens to ensure that there are no malicious scripts hidden in the images, and it’s not something you can disable.

> **Comments:**
> **username_4**: Hi Brandon, I know this is an old comment but we have an issue with our optimised images growing excessively when uploaded due to the call in BaseAssetSourceType to craft()->images->cleanImage() method.  Whilst I understand I can FTP files up and reindex them, it is not an idea solution for a client. Most of our sites do not accept public uploads, so it would be really nice to have a config option wrapping this call, so that we can instruct the client to optimise the images before upload and the filesize be maintained. Ex. 380KB png, optimised down to 155KB, upload in craft becomes 400KB  
> **username_2**: @jay can you write into support@craftcms.com with details of your environment (PHP version, GD/Imagick version)  and a sample image you're having that issue with?  

---

