Link to external images on AppLab

Link to the project or level: https://studio.code.org/projects/applab/t9FpZcG3rcy8g3hoC1VzlQiod_vlT5s6_nJHoG73-xY

What I expect to happen:
Students are trying to link images to external websites and images do not show up. The links work on the browser and I can print the correct link to the console, but it will not show up on AppLab

What actually happens:
Broken images are displayed instead of the linked images

What I’ve tried:
I tried using getImageURL, setProperty, and other things to get the images to show up. If I use an image from the Data tab, it works, but if it is external it will not work.

1 Like

hello @tseguim,

this was a weird issue, but i think it’s the way CDO handles outbound image requests they use a /media path to retrieve them but for some requests they use encodeURIComponent instead of encodeURI which messes up the link i assume for all your dresses

setProperty("pic1", "image", "/media?u=" + encodeURI(garmentPic1[dressID]))

think this should fix it