The Wistia API by default delivers a 100 x 60 pixels image as a video thumbnail, which is far too small to create any quality derivatives from. A full-size original can be fetched instead by simply dropping an argument from the source image URL. Patch to follow.

Comments

traviscarden’s picture

Assigned: traviscarden » Unassigned
Status: Active » Needs review
StatusFileSize
new960 bytes
EvanDonovan’s picture

Looks good at visual inspection, not sure if the extra line is needed, but I wouldn't block on account of that.

traviscarden’s picture

The blank line? I did that to avoid the confusion as to which lines the comment refers to. If there's an established convention for that, I'd gladly hear it.

traviscarden’s picture

Status: Needs review » Fixed

Committed. Thanks.

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

drupalthemernet’s picture

Issue summary: View changes

Hello,

I was trying to solve the quality of thumbs too, but it was Drupal 7 version of this module.

Here is my approach to make a better quality for thumbs, changed some lines of code in MediaWistiaStreamWrapper.inc file, from line 45:

  /**
   * Gets the original thumbnail for the wistia video
   * @return mixed
   */
  function getOriginalThumbnailPath($http_path = '') {
    $parts = $this->get_parameters();
    if(!empty($parts['url'])) {
      $media = _media_wistia_request_data($parts['url']);
      // Strip image crop parameter to get full-sized original.
      $url = str_replace('image_crop_resized=100x60', 'image_crop_resized=640x360', $media['thumbnail_url']);
      return $url;
    } else {
      $media = $this->api->mediaShow($parts['v']);
      $url = str_replace('image_crop_resized=100x60', 'image_crop_resized=640x360', $media->thumbnail->url);
    }
    return $url;
  }

Full-size original image is now in 640x360 dimensions. You can change this value to make it bigger of smaller.

Hope it helps.

Regards,