Your Base64 string must include the prefix structure (e.g., data:image/png;base64,... ). If your backend returns a raw string, manually prepend data:image/png;base64, before feeding it to the download function.
The Base64 string (including its Data URL prefix) is assigned directly to the href . javascript download image from base64 string
The download attribute dictates the default filename presented to the user. Your Base64 string must include the prefix structure (e
Where does the ? (Canvas API, backend API) What file size or resolution are you expecting? manually prepend data:image/png