I need help with this problem:

I upload the articles on magento through Magmi v0.7.22 and associate the images to the product through the plugin "Value replacer", because sku and images have the same name: {item.sku}.jpg.

Until here everything is fine.

It happens that I have some sku with the character / (slash) in the sku, for example: 23df.124/rpo and obviously I can not give the same name to the image.

Can you give me a suggestion on how to solve this problem? Thank you and apologise for my poor English.

  • if there is no problem in changing sku values, than replace / by '-' in a mass using excel sheet or notepad++.... Oct 3, 2017 at 9:49
  • Thank you for your comment. Unfortunately, I cannot change the item code. The associated images are named with a - instead of /. What I need is to know how to write a dynamic variable in order to be able to associate image with the article.
    – Fabrisys
    Oct 3, 2017 at 12:41

1 Answer 1


I have resolved with this regular expression:

{{preg_replace('/\/+/', '-', {item.sku})}}.jpg

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.