If you’re moving from discourse.org hosting to self-hosted, you need to make sure that your backup includes the uploads and attachments. Until you’ve canceled your account or otherwise asked that uploads be included in the backup the backup will point to the uploads on their S3 bucket, which will be deleted soon after your account is closed.
Yes, you typically need to rebake the posts that have attachments after you restore the backup to see that the markdown messages are made into HTML that links to the images on your own server and not theirs.