How to replace one of the uploaded images with another image (the same image, but after modification)

I use free plugin to upload several images at once, and I want to enable the user to edit one or more images before saving them in the database (while keeping the image in the same index as it was before editing).

To do this, I use free plugin (Better uploader) to upload files, but free files uploding plugins do not include the feature of editing images before saving, so I do Workflow to save the uploaded images in a custom stste list, then used other plugin for images editing to enable the user to edit the images he wants from that list.

After editing the unedited image is deleted from the main list and add the alternative edited image to it.

In order for the modified image to take the same index as it was before the editing, I do a workflow that stored the previous images in a list and the subsequent images in another list, then reset the main list to become: the sum of the previous images + the modified image + the subsequent images.

I guess this is not the best way, so I’m wondering what are the best practices for changing a specific value in a custom state list in general? and what are the best practices for enabling the feature to edit images before storing them (my main case)?

Hello @salemmo409 ,

I have gone through this problem. First, you need to create a custom state with the list as shown in the screenshot:

Screen Shot 2022-11-23 at 10.49.05 AM

Then start the workflow on the image upload element when you want to add a list to the custom state.

Screen Shot 2022-11-23 at 10.45.54 AM

Afterward, save custom in your database as shown in the screenshot:

Screen Shot 2022-11-23 at 11.05.30 AM

There will be options like:

  1. Set-list: It will replace the old list with the new one.
  2. Add-list: It will add both lists but the repeating items will be added once.
  3. Add: It will simply add lists and repeating items.

I hope it will help you in resolving your issue.

If any further assistance is required please contact me on:
LinkedIn:- Karamjit Singh - Aprintaa - Rank First To Earn Fast! | LinkedIn
Gmail:- karamwise@gmail.com