If I wanted to rename the files of product images, the only place I’ve found so far is the image editor linked from the media section of the product page in admin.
Is the same functionality available anywhere else? Or through an API? or a csv upload?
(btw: matrixify doesn’t do it)
I’d love to automate file renaming after uploading based on certain parameters.
Is this possible?
I can update the alt information using fileUpdate, but when I update filename, it prompts me: Error: Field ‘filename’ doesn’t exist on type ‘File’. Can you tell me what the problem is? Thank you very much.
hey there, sorry for the confusion. I see a few things that need changing with the API call you are making.
Unfortunately we do not currently expose filename in the File GraphQL type. However, you can query the image’s url and see the new filename reflected in the URL
In the input to fileUpdate, the filename value needs to include the file extension (.jpg, .png etc.) as well. In your example above, you have filename: new_name, it should probably be something like filename: new_name.jpg (or whatever the extension is).