0

I have a problem for renaming image with magmi, I use the magmi datapump API. I want an image with this name : [sku]-[imageName.jpg]

My image field : http://www.domain.com/data/qwerty.jpg
Image Renaming field : re::(.*)::{item.sku}-$1
Image name after import : /i/m/img52d8eaadeb5ce4.90098321.jpg

Someone have an idea?
Magmi : 0.7.18
Image attributes processor : 1.0.25

0

IMHO, you don't need the regexp syntax for this.

1 - capturing (.*) will capture http://xxxx part of image field value, thus leading to invalid filename

2 - You can achieve what you need with the standard 'tag' syntax of image renaming.

{item.sku}-{meta.imagename}
  • I have already tested this solution, result image name : /z/f/zf709184-_magmi.imagename_ – Reglysse Jan 17 '14 at 10:30
  • Edited post, looking at the code for 0.7.18, the imagename is now based on meta.xxx tags. – dweeves Jan 17 '14 at 13:28
  • Now my image name is "/z/f/zf709184-", {meta.imagename} seem to be ignored. – Reglysse Jan 17 '14 at 15:53
  • it reminds be on a bug for meta.xxx of 0.7.18 , could you try with latest magmi git ? – dweeves Jan 17 '14 at 16:02
  • I found with regex, sorry I don't have time to try the new version of magmi but it's in my todo list. Thank you very very much for your work on magmi and your useful help on my problem :) – Reglysse Jan 17 '14 at 16:53
0

I finally found the answer with the help of @dweeves :

re::.*/(.*)::{item.sku}-$1

With regex (.*) I had the beginning of the url (h t t p : / / ...) in the image name so it was incorrect.

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.