
¿¿Que arreglo le debo de hacer para que tambien cuando una imagen se pase de 500px de alto automaticamente tambien se reduzca al maximo size 500px??
Código PHP:
$navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
if (stristr($navigator_user_agent, "msie")) {
return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="" style="width: expression(this.width > 640 ? 480 : true);" /></a>';
} else {
return '<a href="' . $link . '" target="_blank"><img src="' . $link . '" border="0" alt="" style="max-width: 500px;" /></a>';
}

Gracias y hasta luego.
