So I thought I was beign fancy and instead of saving images to my server I converted them to base64 and stored them in the mongo. I thought this solution was awesome until I realized these cant be read by Facebooks graph.
My question is, is it feasible to create an API where i would call like example.com/img/idoftheimg and it would return the data of the image for display so it would be callable as such:
I’m assuming there has to be a way to do this and I was wonderingif someone had done something like this before I get started or had any reasoning why this would be a bad idea as opposed to just simply uploading the image.
I’m thinking i could just create a route that would get picked up serverside and return only the image data, but how do i convert the base64 back into the image data?