I have the base 64 data for my images and I want to save them in my local machine as JPG Files.
My base 64 code starts with
data:image/jpg;base64,/...
I already tried to save it by the following code:
file_put_contents('MyFile.jpg', base64_decode($imgData1));
But I cannot open the created image; it says "the file appears to be damaged, corrupt, or is too large". Could you please let me know what I'm missing.
Also if you need any more clarification, please let me know which part you need more clarification.