I'm using the multimedia asset field, have everything configured correctly, but thumbnails are broken images in the media library and when I try to use the field in a view, configured to show the thumbnail. At the node/edit form, the thumbnail is broken as well. All of the videos have preview images configured on Vimeo.com that show on the node when viewing the video, which works like a charm (THANK YOU @aaron and @kreynen).

I would explain all of the combinations I've tried in my view and in the file styles/ file types configuration, but I don't think that matters if the thumbnails are not showing in the media browser or on the node/edit form.

For now I'm displaying the video_medium file style to the display. I don't think that's ideal, but it might be better than the thumbnail, especially if the thumbnail links to the media entity rather than to the node (this is an anticipated issue if I can get the thumbnails to work).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jerry’s picture

I'm new to the D7 Media module, but FWIW, I'm observing the same symptoms (broken/missing thumbnails, but the video itself appears in the media library).

Update: My problem was due to user error. The video that I was embedding was marked private, so Vimeo wouldn't provide a thumbnail for it via the simple API.

Brian MacKinney’s picture

Project: Media: Vimeo » D7 Media
Version: 7.x-1.x-dev » 7.x-2.x-dev

Moving this to the media project issue queue, as it does not work in either: media:vimeo and media:youtube.

tomfilepp’s picture

I can confirm this issue with both the Media: Youtube and Media: Vimeo modules, so I assume this is Media related.

It seems to happen randomly. Some videos work fine and others don't. No decisive pattern. All videos have been verified as being publicly accessible.

tomfilepp’s picture

More details, I just found these three errors sequentially in watchdog:

  1. Warning: filesize(): stat failed for youtube://v/ML8hJieRNG8 in file_save() (line 573 of /home/site/public_html/includes/file.inc).
  2. Notice: Trying to get property of non-object in upload_process_file_insert() (line 10 of /home/site/public_html/sites/all/modules/upload_process/upload_process.module).
  3. Unable to generate the derived image located at public://styles/square_thumbnail/public/media-youtube/ML8hJieRNG8.jpg.
aaron’s picture

based on those errors, all i can think is that the file is not being properly saved from youtube. for what it's worth, i was able to save that precise video, so i know it's not a problem on youtube's end, such as with private videos or a missing file.

aaron’s picture

if there is an issue with the pipe, i wonder if we could check to see if the thumbnail already exists, and then attempt to download it again later if it doesn't.

bensnyder’s picture

I updated to the latest in the git repository of file_entity, ctools, and media 2.x. Still getting this on jpegs:
Media thumbnails do not show

Dave Reid’s picture

That UI is the media_gallery module.

bensnyder’s picture

I believe you mean the media_browser_plus module... regardless I'm checking into it. Thanks Dave

bensnyder’s picture

  • I disabled the media_browser_plus module (didn't uninstall)
  • Cleared cache
  • Ran cron

Still get this...
Media thumbnails do not show

Yorgg’s picture

Pictures are not showing up after upload from media module UI to /files directory.
Permissions show up as -rw-rw-r-- and www-data user and group.
They do show up after the main form submition though, not the media form submit.

I am using Ubuntu 11.04, Drupal 7.10, Media 7.x-2.x-dev

Dave Reid’s picture

Do you happen to be using private files by default?

bensnyder’s picture

FileSize
7.24 KB

Dave, I'm using public files. Here's a screenshot of the perms:
Media/file perms

It's worth noting I upgraded from Media 1.x to 2.x, perhaps that could be an issue?

Dave I can send you the DB and filesystem if it will help debug. Hit me up through my contact form.

Yorgg’s picture

No. Private file system don't even have a path.
Public path is set to defaults. They are sitting in the sites/default/files root folder.

tomtile’s picture

I had the same problem with my old images after upgrade from d6, the problem was that 'type' in the manage_field table wasn't set to image. But this seems to be something else...

yan’s picture

Same problem with 7.x-1.0-rc3 and both youtube and vimeo:
Unable to generate the derived image located at public://styles/square_thumbnail/public/media-youtube/[name].jpg.

File permissions are not the problem.

tomfilepp’s picture

Any ideas on this? This seems like a pretty big flaw... I wish I could be of more help solving this.

bensnyder’s picture

I sent both aaron and dave copies of my environment so they can better debug. Hopefully they'll be able to get to the bottom of it..

Brian MacKinney’s picture

Also to update, I had been using the deprecated Multimedia Asset field type with Media 2.x, but I have since removed those fields and replaced with file fields. Thumbnails still fail to generate.

bensnyder’s picture

@aaron @davereid I still have that tarball up. Were you guys able to get a copy? Lmk I'd like to take it down once you grab it.

bensnyder’s picture

Anyone who wants to take a stab at fixing this (I've tried w/ no success) please contact me on my contact form and I will gladly send you a full environment to debug this.

Yorgg’s picture

In my case this issue was related to the webserver username ability to read/write the files in the directory:

sudo chown www-data:www-data drupal/sites/default/files

Change www-data to your webserver username and then chown the directory where you have it.

bensnyder’s picture

Permissions are not the problem in my case - both owner and group are have been set to www-data. Thanks for sharing though!!

bensnyder’s picture

Anyone interested in payment for fixing this? I can provide a copy of the site to debug. Please hit me up on my contact form.

drupalninja99’s picture

I have this problem on both webenabled.com and aegir. It seems like some issue maybe curl or image api problem related? I know that it is definitely environmental. My linode server has no problem, nor does my local XAMPP instance.

drupalninja99’s picture

Nothing gets saved in my case to the media-vimeo or media-youtube folders. Something ab some environments affects the fetching of the remote image.

idflood’s picture

I had the same issue on a production server and it looks like fopen is required. On my case I simply added this to the .htaccess:

php_flag "allow_url_fopen" "On"
kasse’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Thumbnail problem in media 1.x because of videocodec. ..may be H624

Brian MacKinney’s picture

drupalninja99’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
bensnyder’s picture

I just upgraded another D7 site running on the same VPS as this website (the one having issues generating thumbnails). I went from Media module 7.x-1.1 to 7.x-2.0-unstable4 and am having no issues at all.

It seems no matter how much I try to debug or test -- I can't seem to find the source of the problem for the first website.

mpgeek’s picture

FWIW, I have experienced this issue with many sites, and every time it is file permissions that need tweaking. Specifically the thumbnail directories within the files directory. I don't think this is a Media issue.

mpgeek’s picture

Status: Active » Closed (works as designed)
samwillc’s picture

Can I just add my solution to an identical issue.

I had DISABLED the view mode 'preview' in /admin/structure/file-types/manage/image/display as I thought I didn't need it. How wrong.

Preview must be ENABLED because the media module uses that view mode for your thumbnails. This fixed my broken images.

Maybe this will help.

Sam.

joelcollinsdc’s picture

+1 for #27, allow_url_fopen is turned off on secured php installations by default. This needs to be added to documentation at the very least.

vthirteen’s picture

Status: Closed (works as designed) » Closed (won't fix)

FWIW, I have experienced this issue with many sites, and every time it is file permissions that need tweaking. Specifically the thumbnail directories within the files directory. I don't think this is a Media issue.

it would be nice to know what you mean by "tweaking". I have the exactly same problem (see issue http://drupal.org/node/1919726 which actually could be marked as a duplicate) and the Files folder permissions are set to 775 recursively, with www-data as user.

any suggestion and further detail on the needed permissions will be welcome!

[EDIT: indeed a likely reason for thumbnail not being generated is allow_url_fopen set to Off. See comment #27 above.]

midmood’s picture

#36 solved for me. Thank you very much!

rickdonohoe’s picture

I have this same problem and I don't know which solution is appropriate here as I have tried (what I think) is all of them.

Under 'My Files' on the browser all I get is tiny squares, which I think is Firefox not finding the image. The path points to sites/default/files/styles/media_thumbnail/public/imce/IMAGENAME, however the actual image is located under sites/default/files

Basically it hasn't being created using the correct image styles and placed into the folder it expects it to.

From what I can tell this is happing to most of 'Library' too.

Any ideas?

brodiebrodie’s picture

this worked for me
admin/structure/file-types/manage/image/file-display/preview

Make sure image check box is checked and move image to the top of the "display precedence" box at the bottom

DetectivePixel’s picture

Issue summary: View changes

#41 solved it for me.

Many thanks!

bendev’s picture

#41 solved it for me as well

Many thanks!

yfedorov’s picture

#41 solved it for me.

samtny’s picture

+1 for #41, setting that 'precedence' worked for me

hilrap’s picture

#41 'precedence' solved it for me as well.

Thank you brodiebrodie!

Robert_T’s picture

Confirmed that #41, the precedence order, solved the problem. #27 had no effect. Glad I found this thread!

happysnowmantech’s picture

+1 for #41, thank you @brodiebrodie!

leocosmos’s picture

I had the same problem in Windows after updating the Media module but #41 solved it. Thanks!

vparfaniuc’s picture

Had the same issue after updating the Media module to v. 7.x-2.0-rc3 so the fix indicated in #41 comment worked well, thank you @brodiebrodie!

eworwa’s picture

I confirm #41 solved for me.

Thanks.

rick_p’s picture

I apologize but I didn't read through all the threads here. However, I had the same missing thumbnail image problem when viewing my Media List. The rest of it was working, I could add media and use it (add it to a page) via the WYSIWYG, but the only issue was the thumbnails were missing in the list, I was getting a generic png file instead. Here's what solved the issue for me...

For Drupal 8 you must also install these modules:

Crop API
ImageWidgetCrop
Media entity crop

After those are installed, make sure your media bundle for images is set to "image" for the Crop Configuration and Save.

Best, Rick