Using feeds import with tamper to split up images at a | our database has thousands of products and only some of them have an image and then some have a second image (a room view of the product) and the images arent tracked in the data.

anyways the build of the url to retrieve the image is: http://domain.tld/imgs/flooring/Manufacturer/IemNumber.jpg|http://domain.tld/imgs/flooring/Manufacturer/IemNumber-room-view.jpg

when importing displays with a second image it works fine along with displays with no images however when importing displays with only one image it puts in two of the same image instead of ignoring the second image that it cant find as I would expect it to

1 Answer 1


I was having a similar problem using the standard feed tamper modules, so in the end I installed the Feed Tamper PHP module alongside it. Here's some example code I've used to split a string and import multiple values into a field using the Feed Tamper PHP module.

if (is_array($field)) {
  $value = implode($field);
else {
  $value = $field;

$field = explode('|', $value);

foreach ($field as $key => $value) {
  $field[$key] = trim($value);

return $field;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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