Edits after code review

Return long image ID
Return streamformatted error or "raw" error