Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute links to avatar photos are http not https #15

Open
betrcode opened this issue Jan 28, 2018 · 3 comments
Open

Absolute links to avatar photos are http not https #15

betrcode opened this issue Jan 28, 2018 · 3 comments

Comments

@betrcode
Copy link

Hi Paul,

I appreciate the work you've done on this plugin. We use it for https://blog.crisp.se
However, when we moved the blog from http to https, the avatar photos are still served with http, causing mixed-content warnings.

Looking at the HTML source code, I can see that the URLs are absolute. Would be nice if they were relative, or at least changed to https. Any idea of how I can accomplish that? Or does it require a plugin patch?

Example HTML:
<img alt="Max Wenzin" src="http://blog.crisp.se/wp-content/uploads/2016/04/Max-Wenzin_avatar_1460440823.png" class="avatar avatar-59 photo" height="59" width="59" title="Max Wenzin">

@betrcode
Copy link
Author

Maybe the scheme argument in the get_avatar can be made configurable?

https://developer.wordpress.org/reference/functions/get_avatar/

@pbearne
Copy link
Owner

pbearne commented Jan 28, 2018

Something is going wrong with your site

The get_avatar function calls get_avatar_data which check is_ssl() and calls the HTTPS version URL

https://developer.wordpress.org/reference/functions/get_avatar_data/

Is your problem with local avatars? I am wondering if the local avatar function is not the problem

@betrcode
Copy link
Author

Thanks for responding. I suspected is_ssl() aswell so I tested it and it returns true.

Found that re-uploading avatars made them https, so we did that as a workaround. Yes, they are local avatars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants