I suggest using a separate service for uploading your images and then link to your upload using the URL field before posting. Catbox works really well. The reason for the error is more than likely because the image is too large for what the instance has set.
This also keeps resources free on the instance you’re using.
Thanks for the suggestion for catbox.moe. Initially I was using imgur due apple shortcuts integration and api for tasker. However after trying out catbox.moe I relized their api is FAR more simpler than imgur to use (no junk json). Also unlike imgur it doesn't redirect to an ad filled site on mobile 🙂