How to upload a image alt text via https request to wordpress?

Describe the problem/error/question

Hi, i have an http request already, that is uploading an image to WordPress. Can somebody tell me, how i can upload the image alt text automatically as well?

Thanks alot.

Information on your n8n setup

  • n8n version: 1.8.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Mac OS

Hi @ManyQuestions
looking at the Wordpress documentation it looks like there’s the alt_text argument you could use.

You could either (1) try to send that attribute when you are creating the media or (2) update the media just after you have created it (using this endpoint) and add the alt_tag.

Media creation: Media | REST API Handbook | WordPress Developer Resources
Media update: Media | REST API Handbook | WordPress Developer Resources

Let me know if that helps!


I got it to work in a separate request note, how do I upload everything together?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.