Closed 5 years ago.
- Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
- Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
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 .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 5 years ago.
- Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
- Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
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/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?
- You did deactivate Jetpack or set it in development mode? – Knut Sparhell Commented Oct 6, 2019 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 Commented Oct 7, 2019 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 Commented Oct 7, 2019 at 9:03
- Yep, although Jetpack is deactivated it serves the pics from the CDN... – OctaviaLo Commented Oct 7, 2019 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 Commented Oct 7, 2019 at 12:10
1 Answer
Reset to default 0The 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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745101034a4611273.html
评论列表(0条)