I have the problem, that in the instector say me:
Resource interpreted as Image but transferred with MIME type text/html:
I have 3 video's on Youtube. All of them not works.
What could it be?
Kindly
I have the problem, that in the instector say me:
Resource interpreted as Image but transferred with MIME type text/html:
I have 3 video's on Youtube. All of them not works.
What could it be?
Kindly
Quick diagnostic for : that Chrome inspector message ("Resource interpreted as Image but transferred with MIME type text/html") means an <img> request returned HTML instead of image bytes (commonly a 404 page, a redirect to the site homepage/login, or a script that outputs the wrong headers). prettyPhoto typically wraps a thumbnail image in an <a> that points to the YouTube URL; if the thumbnail URL returns HTML the lightbox won't open and the console shows that MIME-type warning.
Recommended checks (fast, in this order):
header('Content-Type: image/jpeg');
readfile($path);
exit; Correct prettyPhoto pattern (example):
<a href="https://www.youtube.com/watch?v=VIDEO_ID" rel="prettyPhoto">
<img src="https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg" alt="thumb" />
</a>
<script>
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script> Other possible causes to watch for: the video owner disabled embedding or the video is private (these prevent playback), server-side rewrites redirecting image requests, and Content-Security-Policy or X-Frame-Options blocking embeds. The Network tab and the exact console errors (mixed-content, refused to frame, or the MIME warning) will point to which of these is happening.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.