How to fix error Access to image at '....' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Paulina Jaramillo 10 Reputation points
2023-03-10T20:26:29.2866667+00:00

At my work, our websites sends daily emails with images of reports that are linked to the website itself. It was doing this just fine up until yesterday, however starting today, the images don't show up at all. (see image below)

1

This only happens when we open emails from office 365 on any web browser. When we check on the outlook app, it works fine. We also tried clicking 'inspect' on the email and we got the following error on the console

2

Access to image at 'https://attachments.office.net/owa/itcadmin....' (redirected from 'https://attachments.office.net/owa/itcadmin-.....') from origin 'https://outlook.office.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,069 questions
Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,459 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
3,403 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,709 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,101 Reputation points
    2023-03-14T09:14:48.76+00:00

    Use answers to provide solutions to the user's question.Hello there,

    Depending of the framework used by your backend team, the syntax may be quite different but overall, you'll need to tell them to provide something like Access-Control-Allow-Origin: http://localhost:3000

    Some users has solved this issue by adding this extension on chrome.

    Allow CORS: Access-Control-Allow-Origin

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--


  2. Lachlan 1 Reputation point
    2023-07-26T05:11:54.9666667+00:00

    I think I might have narrowed it down. is the e-mail after the "/owa/" different from the address that you login to Office 365 with? It appears to be in my case with the same error. When I go directly to the attachment link and change it to be the same as my login e-mail it can download the e-mail attachment.

    0 comments No comments