Bypass Photon Image URL in Jetpack Related Post Image

Jetpack is great plugin developed by automattic. Jetpack has several modul that make selfhosting WordPress like PaaS WordPress.com, it will superchare your WordPress.

Although wordpress come with great plugin, there were some fitur that annoye me. Jetpack photon, by default Jetpack will convert your image url to photon url, though you disable photon modul.

One of my favorite modul is related posts. Ahn, I can see the beauty of it, it fast, acurate, and light. The ugly thing about related posts when we enable image, jetpack will serve image from Photon.

Photon is cloud service by wordpress, but I don’t like it couse from my location, photon just has opposite behaviour. So, if you have same problem with me, you have read this post because I will show you how to baypass poton image url in related pst by Jetpack.

Related post uses some method from jetpack/class.jetpack-post-images.php. Open it your favorite text editor.

Find this line of code in the bottom of class.jetpack-post-images.php

That code will covert your image url to photon url. If you comment it, Jetpack will uses this line of code

So, all you need to do is either remove it or comment it. I suggest you to comment it. Or replace the code above (jetpack_photon_url) with this:

Final code should like this:

0 comments… add one

Leave a Comment