Generate https image URL In order to generate full path of images(URL) on views for rest endpoint on my decoupled Drupal project I'm using Image Url Formatter module, everything works correctly until I decide to put the website on HTTPS, In console I see
Loading mixed (insecure) display content 
“http://core.domain.com/sites/default/files/styles/874x492/public/gallery/2017-01/1-907331.JPG?itok=MKfQSWFh” on a secure page

it's because this formatter return HTTP Instead HTTPS for image URLs.

In the situation like this that the websites should work on HTTPS and HTTP both, I advise  my team using //domain.com  instead of http://domain.com or https://domain.com in all endpoint URLS

Now I looking for a solution to return all images URL from http://.... to //... . if I had few views I could benefit REWRITE feature of view but I have a lot of views rest export endpoint.

What is your solution for this requirement?
Doing a quick test, works fine with HTTPS



Views REST XML



Views REST Json



All of the above is using FULL URL



Perhaps someone set it to Absolute file path, which will give you /path/image.jpg (with out the $base_url). Then in some template file they did http://example.com{{ field.image.content }}

update

using template_preprocess_image_formatter() is another solution to change the template formatter of the image.