Closed mialondon closed 11 years ago
I've found some old PHP code from back when the Europeana API was an OpenSearch RSS feed - basically, it may not be relevant now, but the logic might still work...
// get image URL, test to make sure it's an image
$str = $e->enclosure['url'];
$pos = strrpos($str, "jpeg");
$object_url = $e->link;
if ($pos != false) { // note: three equal signs
echo "<img src=".$e->enclosure['url']." alt='thumbnail of ".$e->title."'>";
}
Can't find anything in dpla or europeana apis that helps us here. Switched flickr thumbnail to a smaller size.
added server side image resizing (requires python imaging library/PIL); updated view template with code to call it for all non-flickr images (size is easily adjustable)
@mialondon - is the server-side image resizing sufficient to close this or do we still need more work here?
I think we'll always be on a quest for better images (and it's on the To Do list of some of our provider APIs) but our bit is done. I've put a line in the docs, have a look and see if you can easily provide more useful specifics on the resizing script.
c. 300 pixels width if possible.
Will need to check
If it's not possible to get more consistently sized images, then option A is to use the spine version of Masonry and option B is to do server-side image handling