Fix for mixed-content image embedding
-
Hello,
I’ve used your plugin on a client’s site but unfortunately found it to be causing mixed-content errors within an all-SSL environment. The offending embeds were WordPress webshots. I made a one-line modification to your plugin and it resolves this issue.
I strongly encourage you to merge this patch to remedy this for other users.
Lines 25-27 in super-link-preview.php are as follows:
private $screenshot_services = array(
array("Wordpress", "http://s.wordpress.com/mshots/v1/")
);
I used a protocol-agnostic absolute URL instead. This way, if your site is all-HTTP, your browser requests the webshots as HTTP, not HTTPs. If your site is loaded over HTTPS the webshots will go over HTTPS.
Updated code, lines 25-27 in super-link-preview.php:
private $screenshot_services = array(
array("Wordpress", "//s.wordpress.com/mshots/v1/")
);
Hope this helps.
The topic ‘Fix for mixed-content image embedding’ is closed to new replies.