MIME type issue

(macada) #1

Hello people,

We cant see graps in the “all websites” listing. We get an error in the browser console, that we cant fix: “Resource interpreted as Image but transferred with MIME type text/html:”

Any ideas?

Thanks in advance

(Matthieu Aubry) #2

can you paste a screenshot of the error ? and what is the actual respone text ?

(macada) #3

Hi Matt,

Tell me if the attach is enough for you or ask me whatever you need.

Thanks in advance

(Matthieu Aubry) #4

when you click on one of those requests, what do you see in your browser? any message or do you see the image itself?

(macada) #5

The image never appears. The only we get is a crash image.
We attach another image to show you where is this MIME error

This is our nginx conf file for piwik:

server {
        listen 80;
        server_name XXXXXXXXXXXXXXXXXXXX;
        root /XXXXXX/XXXXXXXXX/;
        index  index.php index.html;

        #access_log  /var/log/nginx/piwik-access.log;
        error_log   /var/log/nginx/piwik-error.log error;

        merge_slashes on;

        # Disable all methods besides HEAD, GET and POST.
        if ($request_method !~ ^(GET|HEAD|POST)$ ) {
            return 444;

        # Support for favicon. Return a 204 (No Content) if the favicon
        # doesn't exist.
        location = /favicon.ico {
                 try_files /favicon.ico =204;

        # Try all locations and relay to index.php as a fallback.
        location / {
                 try_files $uri /index.php;

        # Relay all index.php requests to fastcgi.
        location ~* ^/(?:index|piwik)\.php$ {
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
            fastcgi_buffers 256 4k;
            fastcgi_intercept_errors on;
            fastcgi_read_timeout 14400;
            fastcgi_index index.php;

        # Any other attempt to access PHP files returns a 404.
        location ~* ^.+\.php$ {
                  return 404;

        # Return a 404 for all text files.
        location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
                 return 404;