Support » Plugin: WP Instagram Widget » CORS policy error

  • Resolved nellolux



    I’m experiencing errors on every instagram photo :

    Access to XMLHttpRequest at ‘’ from origin ‘’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

    I tried to add some code as suggested in another post in functions.php of the child theme

    add_filter(‘null_instagram_cache_time’, ‘my_cache_time’);

    function my_cache_time() {
    return HOUR_IN_SECONDS/2;

    But it does not fix the error.

    Could you plese help me here?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Scott (@scottsweb)


    The images look to be loading fine for me on your site ( at the moment. Perhaps your web host cached the error for a short time?

    Hello @scottsweb, thanks for your answer. Yes the images load well, but if you inspect and go on the console output, you will see the errors. Can you try again and inspect please?

    Plugin Author Scott (@scottsweb)


    I do not see these warnings on my own site. I can also see that the response headers from Instagram contain access-control-allow-origin: * which suggests all is well there.

    Interestingly the errors seem to reference the @2x image sizes:

    where as your HTML code (for this plugin) is referencing the standard images:


    So I am not sure what code on your site is responsible for generating the warnings. It doesn’t seem to be from this widget though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CORS policy error’ is closed to new replies.