Is it possible to embed external non-ssl webcam images (i.e.; http://www.goes.noaa.gov/GIFS/WCI8.JPG) into a site using SSL?

I have a lot of clients located in a tourist town and they want to show local conditions etc via remote webcams. They don't show up on the sites after SSL is installed tho of course.

Does anyone know a trick to do this? Iframe perhaps? And how would you implement it? I'm using wordpress. And I don't own the sites that house the webcams.


They don't show up on the sites after SSL is installed tho of course.

Because the browser issues a security warning.

The only way round this is to change all requests to HTTPS. If the site you are pulling the image off only serves content over HTTP then a way round this is to make a secure HTTPS request to a script on your server and this server-side script then makes an HTTP request to the external resource which then relays this back over HTTPS to the client (an SSL proxy).

This has been answered several times over on StackOverflow, with code samples, such as:

  • For images this is quite easy, but for a stream?
    – Martijn
    Feb 28 '17 at 18:18
  • 1
    Still possible, you just have to make sure that whatever you use to do the proxying passes data to the client as soon as it gets it from the server rather than waiting for the request to complete. Feb 28 '17 at 19:04
  • Please note that this approach has some security concerns! Reverse-proxying stuff into your own site gives the second site control over the content that is shown as yours. Security policies like CSP that can be applied to mitigate issues will not work here, because content is served from your site.
    – Alpha
    Mar 7 '17 at 12:24

Have you tried using the url without the protocol ie //sitename.com not http://sitename.com This is the normal work-around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.