Title: jetpack photon modification
Last modified: September 1, 2016

---

# jetpack photon modification

 *  Resolved [mertimiks](https://wordpress.org/support/users/mertimiks/)
 * (@mertimiks)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/)
 * I have jetpack’s photon module activated on my site, and I want to compress all
   images to 80% by using the code below.
 * add_filter(‘jetpack_photon_pre_args’, ‘jetpackme_custom_photon_compression’ );
   
   function jetpackme_custom_photon_compression( $args ) { $args[‘quality’] = 80;
   $args[‘strip’] = ‘all’; return $args; }
 * But the thing is, I do not how to add this code into snippet? If I just simply
   copy/paste this code, and then save it, my images will be compress? For instance
   do I neede a function name maybe as a file name? Long story short how I can know
   that my code is running? And if it is not running, how I can make it run?
 * Thanks
 * [https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467106)
 * Hi,
 * You should be able to just drop this code into a new snippet, and save and activate
   it.
 * To check if it is running, visit your site and look at the URLs of the images
   embedded in posts. If the snippet is running, they should have the extra `quality
   =80&strip=all` arguments on the end.
 *  Thread Starter [mertimiks](https://wordpress.org/support/users/mertimiks/)
 * (@mertimiks)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467126)
 * It doesn’t seem it is activated. That is the url of the image:
 * [http://i1.wp.com/www.konrat.com.tr/wp-content/uploads/2015/08/2408-ada-5-Parsel-Projesi-2-800×400.png](http://i1.wp.com/www.konrat.com.tr/wp-content/uploads/2015/08/2408-ada-5-Parsel-Projesi-2-800×400.png)
 * no quality=80&strip=all text at the end.
 * I think there are two reasons causing this: first can be the image compression
   hasn’t finished yet, second the my code snippet is not working.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467129)
 * I’ve had a look at your site, and the updated parameters are indeed taking effect.
   Perhaps it was just a matter of waiting a cache refresh.
 *  Thread Starter [mertimiks](https://wordpress.org/support/users/mertimiks/)
 * (@mertimiks)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467135)
 * This code has been around for 3 days by now. Why hasnt it updated yet? And when
   it is updated, the image code will include this link quality=80&strip=all in 
   its url: [http://i1.wp.com/www.konrat.com.tr/wp-content/uploads/2015/08/2408-ada-5-Parsel-Projesi-2-800×400.png](http://i1.wp.com/www.konrat.com.tr/wp-content/uploads/2015/08/2408-ada-5-Parsel-Projesi-2-800×400.png)?
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467177)
 * Which page are you viewing that on? When I visit an article like [this one](http://www.konrat.com.tr/en/bal-palas-is-rising/),
   the image links look like this:
 * `http://i0.wp.com/www.konrat.com.tr/wp-content/uploads/2015/08/Konrat-%C4%B0n%
   C5%9Faat-Bal-Palas.jpg?resize=800%2C400&quality=80&strip=all`
 * Which, as you can see from `quality=80&strip=all` on the end, indicates the code
   is working correctly.
 *  Thread Starter [mertimiks](https://wordpress.org/support/users/mertimiks/)
 * (@mertimiks)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467184)
 * I saw that too. But this change didnt apply on pictures on the front page: [http://www.konrat.com.tr](http://www.konrat.com.tr)
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467284)
 * It appears to be working for me. Have you checked more recently? Or are there
   specific images which are not working?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘jetpack photon modification’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

 * [jetpack photon](https://wordpress.org/support/topic-tag/jetpack-photon/)

 * 7 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/jetpack-photon-modification/#post-7467284)
 * Status: resolved