425 ? \'425px\':\'auto\'); max-width: 425px;'; } return '
'; } function handleInput($feed, $link_type, $link_url) { parent::handleInput($feed, $link_type, $link_url); // The FeedLinkHandlerLink class will help sort this url out for us $link_url = $feed->link_url; $imageData = @getimagesize($link_url); if ( ! isset($imageData) ) { // The image didn't pull down properly, could be a link and allow_url_fopen could be disabled $imageData[0] = 0; $imageData[1] = 0; } else { if ( max($imageData[0],$imageData[1]) > 425 ) { // This is a large image, we need to set some specific width/height properties so that the browser can scale it. $scale = 425 / max($imageData[0],$imageData[1]); $imageData[0] = floor($imageData[0]*$scale); $imageData[1] = floor($imageData[1]*$scale); } } $feed->link_url = base64_encode(serialize(array('url'=>$link_url,'width'=>$imageData[0],'height'=>$imageData[1]))); } }