The thumbnails created by the YouTube Field Module have been given the file extension of .png, but the images are actually jpgs.

In Drupal in version 7.40 the following was added to the .htaccess file:

# Add headers to all responses.
<IfModule mod_headers.c>
  # Disable content sniffing, since it's an attack vector.
  Header always set X-Content-Type-Options nosniff
</IfModule>

Because the website is serving up an image that is a jpg, but the browser is expecting a png based on the file extension, the thumbnails no longer appear in internet explorer. Instead, you get a broken image.

Comments

afemath created an issue. See original summary.

afem’s picture

Issue summary: View changes
guschilds’s picture

Status: Active » Needs review
StatusFileSize
new3.2 KB

Very interesting. I've never noticed that the module fetches a jpg from YouTube yet saves it as a png. I've confirmed that the thumbnails aren't showing in IE.

I've attached the patch that saves it as a jpg instead. After applying the patch, you'll want to navigate to the settings page at admin/config/media/youtube and click "Refresh existing thumbnail image files". This will delete all of the video images saved by the module and cause them to be downloaded again on the next page visit. After doing so, the images should be saved as jpg files and should appear correctly in IE. Could you review and test this patch?

Thanks!
Gus

alan d.’s picture

Status: Needs review » Reviewed & tested by the community

We needed this to get the images working on ie11 too.

webservant316’s picture

thanks. patch works for me also.

  • guschilds committed 0e44937 on 7.x-1.x
    Issue #2614374 by afemath, guschilds: Fixed IE11 image bug by saving...

  • guschilds committed 0633336 on
    Issue #2614374 by afemath, guschilds: Fixed IE11 image bug by saving...
guschilds’s picture

Status: Reviewed & tested by the community » Fixed

The patch in #3 has been committed to 7.x-1.x. The same changes have been committed to the 8.x-1.x branch. 7.x-1.x-dev will no longer have broken images in IE11 and this fix will be a part of the next releases (7.x-1.7 and 8.x-1.0-beta3) whenever they happen.

Thanks for reporting it and for the help testing!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.