I have a problem importing a 64 base image through the feeds module. I am consuming a service through jsonpath.

I am using the tamper feeds module to try to decode the image and then save it as a file but I have not succeeded.

I get the data well in the attribute mapping between the service and the content type, but I can not get the feed tamper to decode it and save it as an image in the content type.

Is this possible to do?


Feeds Base64 images module

I have developed a module for this which adds two additional targets for file and image fields:

  • Filename
  • Base64

The 'Filename' target always needs to be mapped first.

I created this module years ago, but I never published it on drupal.org... until today!


| improve this answer | |
  • Ok, I'll be waiting for the approval process to be fulfilled. Thanks – chalo Apr 17 '18 at 14:07
  • The module does not need to go through the approval process as I already have the privilege to create full projects. It was just quicker for me to publish it as a sandbox project. – MegaChriz Apr 17 '18 at 14:51
  • Thanks, I am testing it and I have not yet managed to generate the file, I have mapped the file name first, then the string in base 64, I have been looking at your code and I see that it creates a file in the temporary folder and up to this point I have verified that I have the files in the temporary folder generated without an extension, I do not know why the file is not generated in the files folder. – chalo Apr 17 '18 at 15:22
  • Okay, I was using both attributes thinking that Filename provides the name to the file, while the base is the data, using only base64, the generated image is png that seems ok to me. So thank you very much, it works. – chalo Apr 17 '18 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.