Can't access images from https://oaidalleapiprodscus.blob.core.windows.net via my domain

I’m using dall e api for image generation and it generates the images but whenever I try to open that image’s url from my domain it shows CORS error.

I want to make a pptx of the generated images via PPTXGenJS. It was working fine previously with unsplash.

What do you mean by,

How exactly are you trying to do this?

Thanks for your reply!
My project is to generate images from dall-e and make a power point presentation from those images.
When I open those generated images directly in the browser it works. But when I use ajax request to download those images it shows CORS error.

I have created an img tag and included the generated image url in the src attribute and it works fine.

How exactly are you trying to do this?

Code please.

You’ll probably need to download the image first (with a server side script) and rehost it somewhere else.

These cross origin resource sharing (CORS) policies are sometimes set in place to prevent exactly what you’re trying to do (embedding content directly in a website).

Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.

here’s more info: Cross-Origin Resource Sharing (CORS) - HTTP | MDN


one more thing you can do is turn off CORS in your browser, but I wouldn’t really recommend that. It’s a security feature after all.

2 Likes

Try to download the image from your backend script such as python or php script. Dont use ajax.

Rather, you need to make a preflight CORS OPTIONS method http request, and obtain an “access-control-request-method” value to send as header in your actual GET that follow.

Browse like a browser. Port knock and impersonate.

1 Like