Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
How to make a post request to Wordpress to update images for employees via custom image field using Wordpress API

I'm trying to figure out a way to update employee information on a Wordpress website. so far i have figured out how to update one user at a time by adding id on the endpoint. how can i update all users at once. I'm also using custom field via ACF

var axios = require('axios');

var data = JSON.stringify({
    "acf": {
        "twitter": "aaaaaaa",
      //"profile_picture": null,
    }
});

var config = {
    method: 'post',
    url: 'http://localhost:8888/sitename/wp-json/wp/v2/team/1111',
    headers: {
        'Authorization': 'Basic dhhdsgbhadG',
        'Content-Type': 'application/json'
    },
    data: data
};

axios(config)
    .then(function(response) {
        console.log(JSON.stringify(response.data));
    })
    .catch(function(error) {
        console.log(error);
    });

This code updates team member 1111 twitter url. so 2 questions

  1. How do I do a post request for images.
  2. How will i make this script update all employee profile pictures at once

the images are stored in a folder with each image url using their names

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!