1

On my remote site I have Jetpack's site accelerator (formerly Photon) turned on. So all the images are cached and then served from the Wordpress CDN. When I ported the site to my local machine, including all the options, some setting in options caused the cdn url to be appended to all the srcset tags.

The srcset values are of the form https://i2.wp.com/mh.local/wp-content/uploads/2019/09/Singapore-0595-HDR.jpg This does not work of course since its Jetpack is not connected in local. How can I prevent this behaviour of the Jetpack option causing the images to be served up from the cdn in local?

closed as off-topic by Jacob Peattie, nmr, Max Yudin, cjbj, kero Oct 29 at 16:25

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • You did deactivate Jetpack or set it in development mode? – Knut Sparhell Oct 6 at 23:44
  • Not on my live site, no. Should I do that? I read some problems people had losing their stats after deactivation so was a bit apprehensive of doing this... – OctaviaLo Oct 7 at 8:13
  • The local site is the one in question, so that is what I mean. Does it serve images from the CDN even when Jetpack is deactivated or in dev mode? Side question: You do not loose stats if Jetpacks is deactivated, as long as it has the same host/URL when reactivating it. – Knut Sparhell Oct 7 at 9:03
  • Yep, although Jetpack is deactivated it serves the pics from the CDN... – OctaviaLo Oct 7 at 9:25
  • This should not be possible, unless something extraordinary is going on. Jetpack filters "the_content" for inline images and "image_downsize" for featured images. Nothing is permanently changed, not database content, nor uploaded files. How did you port your content? Could it have been ported from the front end display (html) instead of export from the database? – Knut Sparhell Oct 7 at 12:10
0

The the end the solution was to turn on Jetpack in development mode which allowed me to turn photon/ site-accelerator off. My site had a period in the name http://mh.local, so it was necessary to add [const JETPACK_DEV_DEBUG = TRUE][1]; to my wp-config file before I could turn Jetpack on.

Not the answer you're looking for? Browse other questions tagged or ask your own question.