Images “src” is replaced with a base64 empty image

I’m using HTMLRewriter to post my blog under a custom domain. While the main cover of the website is being rewritten properly, all other images “src” property is replaced with a “data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7” value.

I don’t know why my Worker is behaving like this. I’m not replacing source links anywhere.

Can anyone please tell me what’s going on?

Example:

Original code:
<img src="/_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=3840&amp;q=80" decoding="async" data-nimg="fill" style="position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover;object-position:center 50%" sizes="100vw" srcset="/_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=640&amp;q=80 640w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=750&amp;q=80 750w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=828&amp;q=80 828w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=1080&amp;q=80 1080w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=1200&amp;q=80 1200w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=1920&amp;q=80 1920w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=2048&amp;q=80 2048w, /_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2F7c161d56-f920-4eb9-8133-148311334433.png&amp;w=3840&amp;q=80 3840w">

Rewritten code:
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" decoding="async" data-nimg="fill" style="position:absolute;top:0;left:0;bottom:0;right:0;box-sizing:border-box;padding:0;border:none;margin:auto;display:block;width:0;height:0;min-width:100%;max-width:100%;min-height:100%;max-height:100%;object-fit:cover;object-position:center 50%">

You can see that both links work:
https://vizinhos.super.site/_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2Fec430404-c07d-4cdc-8623-9853384ce75b.png&w=3840&q=80

https://old.vizinhos.org/_next/image?url=https%3A%2F%2Fsuper-static-assets.s3.amazonaws.com%2F6580bb7c-a09c-45bc-b026-6d3eb883265c%2Fimages%2Fec430404-c07d-4cdc-8623-9853384ce75b.png&w=3840&q=80