Chrome warning of "Resource interpreted as Document but transferred with MIME type image/webp" inspite of specifying "Content-Type: image/webp" header

12,711 views
Skip to first unread message

Anjanesh

unread,
Apr 14, 2011, 1:53:55 AM4/14/11
to gsutil-...@googlegroups.com
gsutil -h "Content-Type: image/webp" cp -a public-read test.webp gs://my-bucket/test.webp

But when I load the image in Chrome, Console in Developer Tools shows a warning :

Resource interpreted as Document but transferred with MIME type image/webp. or Resource interpreted as Image but transferred with MIME type image/webp.

curl --head http://my-bucket.commondatastorage.googleapis.com/test.webp
HTTP/1.1 200 OK
ETag: "6d5fed89b2e18d23b17b997806d8518f"
Content-Type: image/webp
Last-Modified: Thu, 14 Apr 2011 04:22:50 GMT
Content-Length: 29302
Date: Thu, 14 Apr 2011 04:53:03 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE

So why is Chrome giving this warning ? Do I need to specify something like -h "MIME-Type: image/webp" instead ?
Message has been deleted

Richard Rabbat

unread,
Apr 18, 2011, 1:53:20 AM4/18/11
to Navneet Joneja, gsutil-...@googlegroups.com
Anjanesh

I've seen this warning with both JPEG and WebP. Do you get the same warning with jpeg? seems harmless to me.

Richard.

On Thu, Apr 14, 2011 at 9:38 AM, Navneet Joneja <njo...@google.com> wrote:
No, your code looks OK to me. Adding Richard, who might be more conversant in Chrome + webp.
- Navneet



--
Richard Rabbat | Product Manager | Google, Inc.
E: rab...@google.com | M: +1-650-714-7618 | Google Voice: +1-617-213-0819

Anjanesh

unread,
Apr 19, 2011, 2:35:52 AM4/19/11
to gsutil-...@googlegroups.com, Navneet Joneja

0 warnings on the JPG version page

Google Chrome 11.0.696.48 (Official Build 81577) beta
WebKit 534.24 (branches/chromium/696@83359)
V8 3.1.8.12
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.48 Safari/534.24
Command Line /opt/google/chrome/google-chrome -enable-default-apps --flag-switches-begin --flag-switches-end
.

richard...@gmail.com

unread,
Apr 19, 2011, 1:30:07 PM4/19/11
to gsutil-...@googlegroups.com, Navneet Joneja
I tried again with 2 images, a jpeg and a webp image
I got for each of them:
Resource interpreted as Document but transferred with MIME type image/jpeg.
Resource interpreted as Document but transferred with MIME type image/webp.

I verified that each of them is transmitted with the right content type:

Content-Type:
image/jpeg

Content-Type:
image/webp


Long story short, feel free to ignore the warning. Try to embed a webp image in a web page and make sure it works correctly in supported browsers (Chrome and Opera)

Richard.

Anjanesh

unread,
Apr 19, 2011, 2:46:07 PM4/19/11
to gsutil-...@googlegroups.com, Navneet Joneja

Oh...it does show for both when loading the image alone in the browser. I was referring to loading the webpage containing the images.

rabbat

unread,
Apr 20, 2011, 6:16:26 PM4/20/11
to gsutil-discuss
this warning "Resource interpreted as Document but transferred with
MIME type image/webp. "
is expected when you have Chrome display an image as a document and
applies to any image format

This warning "Resource interpreted as Image but transferred with MIME
type image/webp. "
should not be there. You are serving the image correctly. I have asked
the Chrome Developer Tools team to look into it and fix it in a future
version but for now, you're good to go

:)


On Apr 19, 11:46 am, Anjanesh <anjan...@gmail.com> wrote:
> Oh...it *does* show for both when loading the image alone in the browser. I
Reply all
Reply to author
Forward
0 new messages