我正在尝试使用 Cloudinary 图像优化。在大多数情况下,它工作正常,但如果图像 URL 中有空格,它会返回 HTTP 400 错误请求。
我尝试了以下 Cloudinary URL:
https://res.cloudinary.com/CLOUDINARY_TENANT/image/fetch/w_200/q_auto:best/f_auto/https%3A%2F%2Farena.wien%2FEventDb-Images%2FGATECREEPER%20euro%20dark%20superstition%20tour%20flyer%20ALL%20DIGITAL.jpg%3Fw%3D743%26q%3D60
https://res.cloudinary.com/CLOUDINARY_TENANT/image/fetch/w_200/q_auto:best/f_auto/https%3A%2F%2Farena.wien%2FEventDb-Images%2FGATECREEPER%2520euro%2520dark%2520superstition%2520tour%2520flyer%2520ALL%2520DIGITAL.jpg%3Fw%3D743%26q%3D60
有人有解决办法吗?谢谢!
请注意,虽然为了浏览器的原因必须对某些字符进行转义,但对于 Cloudinary,[/ 和 ,] 必须进行双重转义,如下所述: http://support.cloudinary.com/hc/en-us/articles/202521512-How-to-add-a-slash-character-in-text-overlays-