Closed (fixed)
Project:
Embedded Media Field
Version:
6.x-1.x-dev
Component:
Embedded Image Field
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2008 at 16:58 UTC
Updated:
19 Nov 2009 at 21:58 UTC
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
Comment #1
aaron commentednot 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.
Comment #2
buddaDoesn'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?
Comment #3
alex ua commentedCan you test this out in the 6.x-1.x-dev version? I think this has been taken care of.
Comment #4
alex ua commentedPlease 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.