0) $content = qa_image_constrain_data($blob['content'], $width, $height, $size); else $content = $blob['content']; if (isset($content)) { header('Content-Type: image/jpeg'); echo $content; if (strlen($content) && ($size > 0)) { // to prevent cache being filled with inappropriate sizes $cachesizes = qa_get_options(array('avatar_profile_size', 'avatar_users_size', 'avatar_q_page_q_size', 'avatar_q_page_a_size', 'avatar_q_page_c_size', 'avatar_q_list_size')); if (array_search($size, $cachesizes)) qa_db_cache_set($cachetype, $blobid, $content); } } } } qa_db_disconnect();