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 as https if the URL is https or as http if the URL is http. will have images <img src="http://.... 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.