Hi,
Doing this is very easy with imagemagick binary.
You will need any vps with linux installed. You can spin up a vps from digital ocean in 5$. I prefer ubuntu servers. Then from inside php , we will execute the imagemagic binary to create gif.
Now the task is to
1) store images uploaded by used in a separate folder
2) use that folder as argument to imagemagic