Base64 to image

I am trying to convert base64 to image and display it on dashboard.
But getting the error which says : Error: ENAMETOOLONG: name too long
What could be the possible solution for the same?

This example shows how a Pi camera image can be converted to base 64 and inserted into the dashboard so it can be viewed