Decode base64 image and save it on a webserver - retrieve the same and encode again
<p>I have an image that I get in the form of a base64 string from an API response. Initially - I was saving the string directly in my database in a <code>mediumtext</code> field. But it seems to be eating up too much space.</p>

<p>Is there a way I could save the image as a flat file - store it's link in my image field in the database - and retrieve it using a query again ? </p>

<p>I'm using PHP on the server side - and AWS. I need this as I'm running out of DB space.</p>

<p>Also - I know we could save a base64 string by decoding it to an image and saving it on the server - but how can I retrieve and encode the same?</p>