Google App Engine for WordPress
[resolved] Images load using HTTP instead of HTTPS (7 posts)

  1. loudnotes
    Posted 1 year ago #

    My site uses HTTPS on all pages, but when GAE is enabled the source of all images is of the form src="http://lh6.ggpht.com/..."

    This leads to security warnings and the following error in my Chrome console: The page at 'https://MYSITE.appspot.com/' was loaded over HTTPS, but displayed insecure content from 'http://lh6.ggpht.com/...': this content should also be loaded over HTTPS.

    When GAE plugin is disabled, my images are all of the form src=https://storage.googleapis.com/MYSITECLOUDBUCKET/...

    Is there any way to force the GAE plugin to use HTTPS and/or use the latter URL convention instead of the ggpht.com one?


  2. loudnotes
    Posted 1 year ago #

    Relatedly, is there a way to serve static files (such as a PDF) over HTTPS rather than HTTP?

  3. slangley
    Plugin Author

    Posted 1 year ago #

    We could add a check box in the plugin setup to serve images over HTTPS.

    If you want to fix (aka hack) this in yourself it's a one line change.

    Change this line from

    $baseurl = CloudStorageTools::getImageServingUrl($file);

    $baseurl = CloudStorageTools::getImageServingUrl($file, ['secure_url' => true]);

  4. loudnotes
    Posted 1 year ago #

    Thanks Stuart - works!

  5. perqa
    Posted 1 year ago #

    I have a similar problem: the plugin generates http URLs, but they are also invalid. The solution above did not help, neither for the https nor the validity.

    Example URL: http://lh4.ggpht.com/uDWdZWCSAQ1eJmix54cnCMd-X4KhdG7GPADYsHS_qOzwIgHjpiFQ3TH5xjXL4IC9Yit_qxkPjzFg0v5DpP6W5O_4KUHddLE=s99999-c

  6. Mickywok
    Posted 1 year ago #

    Similar problem for me as well - the site is loaded over https but displaying Insecure content from http URLs. Tried the fix above but no success.

    Any other solutions out there?

  7. Mickywok
    Posted 1 year ago #

    Solved my issue, I think...
    Did the fix mentioned above, manually amended a few URLs from http to https, then re-uploaded some attachment images that were displaying over http and everything now seems to be fine (ie. all loaded over https).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google App Engine for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic