gatsby-source-datocms icon indicating copy to clipboard operation
gatsby-source-datocms copied to clipboard

Get base64 code for image

Open maximeealet opened this issue 2 years ago • 0 comments

Hi there,

I need for a project to get the base64 code of an image I upload on DatoCMS. In the Graphql schema base64 is only for blurred image placeholder.

I tried using a resolver to access to the image url and convert it in javascript with no luck as the url field doesn't seem to be accessible by the source arg in my resolve function.

Would you have any lead I could follow to perform this at build time instead of retrieving the url as usual and convert directly inside my page ?

Thanks in advance !

maximeealet avatar Mar 18 '22 09:03 maximeealet