Why don't you use a service like Cloudinary? A service that stores images.
First of all, upload the image from php to api to cloudiary. After you upload it, you can get url, so I think it'll be much easier if you just save url in db.
© 2024 OneMinuteCode. All rights reserved.