Images after a restore don't have S3 bucket URL

Yes, please do that. And look at the output from the restore. It shouldn’t mention any remapping of URLs when you restore a .sql.gz