I need to dynamically create an https:// URL of images stored within my database.
Is there a way to generate an automatic conversion of an image field/column upon insert to another column containing a publicly accessible external URL pointing to that same image?
Alternatively, it would be great to have a download option for exporting databases into CSV files changing internal media manager addresses to external ones.
I am a novice in js coding, so really don't understand how to achieve this within wix.
Even understanding a manual algorithm for generating the appropriate address would be useful (if that is doable and doesn't entail some special mapping).
Hello Doborah,
I would also like to find a way to export all my images "wix url", like "image://v1/..." If you find a way do to that I'll appreciate if you can share it with me.
To replace the image://v1/... to a https:// URL for image, I use this function I created in my project to do so...
function getImageUrl(image) { if (image && image.startsWith("image:")) { return image.replace("image://v1/", "https://static.wixstatic.com/media/").replace(/mv2.png.*/i, "mv2.png"); } return image; }
and this works for me