Ghost with custom CDN is possible?

I integrated Bunny CDN by re-writing the image URL’s with nginx, it does does not break the backend /ghost - and Ghost can be edited on the non-cached origin URL. normal site URL