Hiding External Url , Proxy images by workers?

Hello,
I want to use remote server for images by hiding real url.
I have a.com/images and b.com/images
b.com/images have real images.
I want to show images of b.com in a.com website.
So i wrote a worker script by the help of some posts (thanks them)
it works as redirecting the image url but not hiding them. I can see new url on chrome development panel.
I learned that it can be made by htaccess proxy (apache mod proxy). But it didnt work yet too.
Is it possible to make this by cloudflare ? I want to hide real source for security reasons.

addEventListener(“fetch”, event => {
let requestURI = new URL(event.request.url);
console.log(event.request.url);
if (requestURI.hostname == “www.a.com” && requestURI.pathname.startsWith("/images")) {
event.respondWith(rewriteURL(event.request));
}
})

async function rewriteURL(request) {
var URI = new URL(request.url);
var parts = request.url.split(’/’);
var lastSegment = parts.pop() || parts.pop();

URI.protocol = “https”;
URI.hostname = “b.com”;
URI.pathname = “/images/”+lastSegment;
console.log(URI);
return fetch(URI, request);
}