$photosize = module::get_var("qrcode_block", "photosize"); // photosize can be: thumb, resize, file // strip the ?m=xxx of the end of the url $photo_url = preg_replace('/\?m=.*/', '', $item->resize_url(true)); // how do I get $item->resize_url(true) to be thumb_url or resize_url or file_url from the $photosize variable?