After trying SSL and having some unfortunate problem with it, I decide to go back to HTTP. Everything seems find, by the srcset attribute of <img> tag is still https everywhere.

This post Wordpress: srcset gets HTTP instead of HTTPS in all posts asks for the opposite direction, but still provides me guides to diagnose. However:

  1. In wp-includes > media.php, I can find the wp_calculate_image_srcset method, but unable to find these two lines:

    $image_baseurl = _wp_upload_dir_baseurl();
    $image_baseurl = trailingslashit( $image_baseurl ) . $dirname;
  2. In wp_options table, both home and siteurl already have http values.

I also delete all cache. Still no help.

What else do I need to check? Here is my page: quảcầu.com.

  • 2
    Those srcset images are coming from Jetpack. So you need to turn off Photon from Jetpack to serve images on HTTP and from your own server. Not sure why would you revert all of this, when you might end up adding https all over again.
    – Kumar
    Aug 21 '19 at 11:10
  • thanks. If you make that an answer I'll accept it. Anyway, I wonder what is the point of that feature, if all it does is change the link from HTTP to HTTPS. And the reason I do that is because my server somehow blocking access of Facebook bot. See What makes Open Graph checkers unable to detect Open Graph data? - Let's Encrypt Community Support
    – Ooker
    Aug 21 '19 at 13:14
  • I'll post it as answer and about your other question I'd need to go through it later.
    – Kumar
    Aug 21 '19 at 14:22

@Ooker It's the Jetpack that is serving you the images on https. If you'd turn off the Photon add-on from Jetpack you should be able to get images served over http from your own server.

Also if you turn off Photon, images won't be served from CDN anymore, so you might have to figure that out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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