Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Image MIME type errors

the following error is showing up when I load a certain page: "Resource interpreted as Image but transferred with MIME type text/html:" I tried changing the file path to a root relative path in the css but to no avail. Do I need to edit the .htaccess file or something?

here is the code. my php loops over it

<div class='file-type pdf' style='background-image:url("<?php echo $product["pdf"]["cover"]; ?>");'></div>
<div class='file-type wav' style='background-image:url("products/Cover Images/sellfy-wav-bg.png");'></div>

The weirder thing is that the page background image isn't affected and shows up just fine. It's only these images that don't work. The console indicates that it's something to do with the most recent version of jQuery, but, of course, I can't just stop using jQuery.

4 Answers

Herb Bresnan
Herb Bresnan
10,658 Points

Are you still having this problem? I was getting the same error in the console using JavaScript.
The main thing to remember is, I was trying to solve an error in JavaScript and not PHP and that I am not familiar with PHP. That being said: My problem stemmed from installing Visual Basic on Windows which added this registry entry for the .js files : (Default) REG_SZ JSFile Content Type REG_SZ text/plain
Perceived Type RG_SZ text

This registry entry gave me the console error "Resource interpreted as SCRIPT but transferred with MIME type text/html:" I edited the registry to read: Content type text/JavaScript. Which solved the problem. I found this answer on Stack Overflow. You may want to check there about PHP issues.

I don't have Visual Basic on my computer so I don't think that's the issue.. thanks for the input though.. kind of sad that no one else has responded so far to this.. because of unique circumstances, I have had to abandon my web design career until this issue is resolved. I have posted this issue on many forums around the internet and no one until now has even responded.. and I still don't have the solution.. so much for getting help when I need it the most lol

good thing I am a professional musician, too, so there's at least something else i can do until this gets resolved

Herb Bresnan
Herb Bresnan
10,658 Points

I am sorry to hear about that. Usually people in this forum are right on top of things. If you decide to try again, I still think stack overflow website is your best bet for finding answers you can't find here. Or email the instructor directly. Don't give up on this if its what you want to do. If you like, I will help search for an answer.

Best of luck with your music, Herb (amateur bass player)

I appreciate your thoughts Herb, but at this point, I can't be bothered with it unless I receive a direct answer. I realize that it's no ones fault necessarily, but I've spent so much time stressing about it and trying, without any progress, to figure it out that until/unless I get a direct answer on this or another thread from other forums I'm not willing to go through any more rigamarole with this. I have updated the question slightly, so maybe it will be easier for someone to provide a solution. Thankfully, I am a professional level pianist and I'm way WAY better at music and piano etc. than I am at this.

Herb Bresnan
Herb Bresnan
10,658 Points

No problem. Hope you find your answer.