Code:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} .wp-content/uploads/ 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I am trying to call all images from any subfolder of mysite.com/wp-content/uploads/ as https if the URL is https or as http if the URL is http.

http://mysite.com/some-page-with-images/ will have images <img src="http://....

https://mysite.com/some-page-with-images/ will have images <img src="https://....


The problem is that when you go from a https page to a page with images,coded as http, an error occurs saying that some content is not secure.