We don't know the width/height of flickr images and setting a default size frequently leads to ugly browser upscaling on portraits. Seems that the sensible thing here is to put 0 values in width and height and show them at the flickr defaults (I think this is max 500 pixels width or height). However this triggers the thumbnail view in flickr_guess_size(). Possibly a quick hack but one way of fixing this is to make the following small change in flickr.inc

function _image_ncck_flickr_guess_size($width, $height) {
  $max = max($width, $height);

  // new bit here
  if($max == 0)  { return null;  }

  foreach (array('s' => 75, 't' => 100, 'm' => 240, '' => 500, 'b' => 1024) as $size => $value) {
    if ($max <= $value) {
      return $size;
    }
  }
  return 'o';
}

N.B The thumbnails still seem to have the jaggies so this maybe just fixing a symptom.

Comments

aaron’s picture

not a bad idea. the best solution would be to store the largest size we can get and serving up an imagecached version. there's an issue for that somewhere.

budda’s picture

Doesn't that then defeat the purpose of using flickr to host your images, if you're going to download and scale them on the local server?

alex ua’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Can you test this out in the 6.x-1.x-dev version? I think this has been taken care of.

alex ua’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Please see this issue: http://drupal.org/node/637778

Active development of the Flickr provider has been moved to the media_flickr module (http://drupal.org/project/media_flickr), so we need to remove the flickr.inc file from emfield, since a newer, better, version of the provider is available there.

Please direct any flickr related support requests to the media_flickr issue queue: http://drupal.org/project/issues/media_flickr.