They are different stories. The XF one is by CSS which can limit by CSS while this one is javascript. It will unable to do in some cases or require extra works in JS to check the size of image.I didn't see a preview of it and it's a great addon - so here's a screenshot from my forum.
Also, I have two suggestions that would make this amazing - if you'd add them:
I'm using SSL and when you open the image, it doesn't use the image proxy.. Can you fix this and also, I'm not a fan of it doing this to every image, could you only do it to ones that are too big for the page (like xF usually does).
Error Info
ErrorException: Fatal Error: Call to a member function thumbnail() on boolean - image.php:45
Generated By: Unknown Account, 17 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(128) "https://mysite.com/image.php?url=http://natgeo.petsmart.com/content/img/guinea-pig/guinea-pig-behavior.jpg&width=300&height=300"
["_GET"] => array(3) {
["url"] => string(73) "http://natgeo.petsmart.com/content/img/guinea-pig/guinea-pig-behavior.jpg"
["width"] => string(3) "300"
["height"] => string(3) "300"
}
["_POST"] => array(0) {
}
}
{
$image_gd->thumbnail($max_width, $max_height);
}
switch ($image_type[2])
{
case IMAGETYPE_GIF:
case IMAGETYPE_JPEG:
case IMAGETYPE_PNG:
$image_gd = XenForo_Image_Gd::createFromFileDirect($validUrl, $image_type[2]);
if (!$internalLink && $max_width)
{
$image_gd->thumbnail($max_width, $max_height);
}
else
{
$image_gd->thumbnail($image_type[0], $image_type[1]);
}
$response = new Zend_Controller_Response_Http();
$response->setHeader('Content-Type', $image_type['mime']);
$response->sendHeaders();
$image_gd->output($image_type[2]);
break;
case IMAGETYPE_BMP:
$response = new Zend_Controller_Response_Http();
$response->setHeader('Content-Type', $image_type['mime']);
$response->sendHeaders();
echo file_get_contents($validUrl);
default:
$response = new Zend_Controller_Response_Http();
$response->setHeader('Content-Type', $imageTypes['png']);
$response->sendHeaders();
echo file_get_contents(XenForo_Template_Helper_Core::getAvatarUrl(array(), 'l'));
break;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.