public function img($img) { $response = new WFEResponse(); try { $response->setContent(WFELoader::content('public/img/' . $img)); } catch (WFEFileNotFoundException $e) { WFERouter::run404(); } $response->setFormat('image/' . pathinfo($img, PATHINFO_EXTENSION)); return $response; }