• Resolved stefanimhoff

    (@stefanimhoff)


    Hi,

    I’ve a problem: in a Test-Enviroment the Gravatar-Images are cached, but the Browser does not laud them due to mixed content blocking.

    Why are the images loaded via http instead of https?

    <img alt="Stefan" src="https://plusculum.hosting109736.a2f15.netcup.net/wp-content/uploads/avatar-privacy/cache/gravatar/a/c/7c21c398bdb52e04d46ee3552bee7b1e19f4970f46f22062ab8f0712f658fbad-80.jpg" srcset="https://plusculum.hosting109736.a2f15.netcup.net/wp-content/uploads/avatar-privacy/cache/gravatar/a/c/7c21c398bdb52e04d46ee3552bee7b1e19f4970f46f22062ab8f0712f658fbad-160.jpg 2x" class="avatar avatar-80 photo avatar-default" width="80" height="80">

    Best regards,
    Stefan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author pepe

    (@pputzer)

    It might be a configuration issue. I’m retrieving the upload directory URL via wp_get_upload_dir(). I’ve found a related Trac ticket (#25449), but all my sites are running fine on SSL, so I think it’s got something to do with sites that are available via both protocols. Is that the case on your test environment?

    Plugin Author pepe

    (@pputzer)

    @stefanimhoff I’ve tried reproducing the issue locally, but an SSL site created via MAMP Pro does not exhibit the same problem. I know what a possible workaround could look like, but I need more information on your configuration to make sure it is actually applicable.

    Thread Starter stefanimhoff

    (@stefanimhoff)

    @pputzer OK, it seems, that some informations in the database were indeet on http…
    I’ve corrected them with better search & replace.
    But the avartars are still not loaded due mixed content blocking.

    I’ve dumped the output of wp_get_upload_dir():
    array(6) { ["path"]=> string(82) "/var/www/vhosts/hosting109736.a2f15.netcup.net/kunden/plusculum/wp-content/uploads" ["url"]=> string(67) "https://plusculum.hosting109736.a2f15.netcup.net/wp-content/uploads" ["subdir"]=> string(0) "" ["basedir"]=> string(82) "/var/www/vhosts/hosting109736.a2f15.netcup.net/kunden/plusculum/wp-content/uploads" ["baseurl"]=> string(67) "https://plusculum.hosting109736.a2f15.netcup.net/wp-content/uploads" ["error"]=> bool(false) }

    I’m also a bit confuesed, becouse using SSL is the normal case today…

    Where/in which file/class/function is the URL generated?

    Best Regards!

    Plugin Author pepe

    (@pputzer)

    Well, the final <img> tag comes from get_avatar(). Have you got any other plugin enabled that might add a filter on the get_avatar or get_avatar_data hooks?

    Thread Starter stefanimhoff

    (@stefanimhoff)

    Hi, I’m sorry. Just going through the database with better search & replace was not enough: I don’t know why, but die site-URL was still on http while the home-URL was on https. Correcting the site-URL fixed the issue.

    I’m sorry about disturbing you with this…

    Best regard and many thanks!

    • This reply was modified 6 years, 1 month ago by stefanimhoff.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Mixed Content for cached Gravatar-images’ is closed to new replies.