Image returned by API (remove.bg via Make) "breaks" the site or does not display correctly after processing

Hello everyone.

I am integrating the remove.bg service with Make.com and a frontend. My goal is for users, after generating or selecting an image, to click “Remove background,” which sends the image to a scenario on Make, where it is processed and returned with the background removed for immediate viewing and use on the page.

The problem:
Even though the Make scenario finishes without error and returns an imageBase64 field (using data:image/png;base64,...) to the frontend, the browser does not display the image. Instead, I see the “broken image” icon, and in some cases, the site even freezes after this response. When inspecting the API response, I noticed:

  • Sometimes the returned field seems to contain binary data or unexpected text, not proper base64.
  • Other times, after clearing cache and retrying, the browser just shows the default/template icon for a “not loaded image.”
  • The Make scenario does not show any obvious error, but when looking at the devtools (Network), I see that the content returned may be invalid for an image (sometimes even HTML or plain text in error cases).

What I have tried so far:

  • Verified that the field sent to the frontend was really the processed result from remove.bg, converted with base64() and the correct prefix.
  • Tested loading the returned data URL in other viewers, but it caused file/corruption errors.
  • Checked that the field coming from remove.bg is a binary buffer, not base64, and simply applying concat() without converting gives a JSON error.
1 Like