Short answer: S3-compatible object storage is a good home for AI-generated images when a worker uploads the PNG buffer as binary, verifies the stored metadata before its database commit, and serves the result with a presigned link instead of a permanent public URL.
A malformed base64 decode error is usually an ownership mistake at an interface. A PNG already has bytes; turning those bytes into text for a queue, then decoding them again before upload, creates room for a data-URL prefix, missing padding, or a second decode. Decode at the documented generation boundary once, validate the bytes, and keep the rest of the path binary.
Small rule. Large consequence.
What signal says a Node.js generated PNG needs an object-storage runbook?
The signal is simple: the application accepts a generation, yet the delivered object cannot later be read or no longer has the expected size and image/png type. A successful generation request is not the success event.…