External images changing to https
I’m recently working on a blog which requires me to include many images from external URLs instead of hosting them on the server. Many of these images are not available on https, so I need to insert http links of them. But when I click on ‘Save draft’ or ‘Preview’, the plugin changes the URLs to https. The problem is, the images are not available on the external servers as https. So I get a 404 for the image and as a result, it doesn’t load.
I tried various settings but I was not able to have the desired result without unchecking the “Always use HTTPS while in the admin panel. This setting is identical to FORCE_SSL_ADMIN.” option.
I tried looking around within the plugin code to see if I could find a way to fix this myself, so I changed a line in the “Blogdir\wp-content\plugins\wordpress-https\lib\WordPressHTTPS.php” file, line no. 56. I removed the image formats ‘jpg’, ‘jpeg’, ‘png’, ‘gif’ from the $_file_extensions variable. This seems to work.
I just want to make sure if this will affect anything else on my site, as I have not had the chance to go through the entire working of the code.
- The topic ‘External images changing to https’ is closed to new replies.