Remove image from product using velo

Question:
Im tring to use the docs of velo, to remove from product image by selecting it from gallery. the officel docs is export function removeProductMedia(productId, media) { return wixStoresBackend.removeProductMedia(productId, media); }

but it donsent work, it seems that the problem have connection to “media” parametr in the function.

i try evrithing. and im alredy using function with the same syntaxt and with the same parameter that work export function addProductMedia(product, mediaData) { return wixStoresBackend.addProductMedia(product, mediaData); }

you guys have any idea?

that my first time asking in stackoverflow after years of using

im passing for trying tamplate image and the result “src.tolocalelowercase is not a function” { "description": "", "id": "c3904a_3efe2c7fd11d480199986dd13ead530a~mv2.jpg", "link": "null", "src": "wix:image://v1/c3904a_3efe2c7fd11d480199986dd13ead530a~mv2.jpg/file.jpg#originWidth=720&originHeight=1600", "title": "", "type": "Image" }
Product:
[Which editor or feature is your question most relevant to? e.g. Wix Editor, Wix Studio Editor, Editor X.]

What are you trying to achieve:
[Explain the details of what you are trying to achieve. The more details you provide, the easier it is to understand what you need.]

What have you already tried:
[Share resources, forum topics, articles, or tutorials you’ve already used to try and answer your question.]

Can you share the code that is not working?

The media object to remove should look like this:

https://www.wix.com/velo/reference/wix-stores-backend/removeproductmedia