public function executeRender() { $product = ProductPeer :: retrieveByPermalink($this->getRequestParameter('permalink')); $this->forward404Unless($product instanceof Product); $this->getResponse()->setHttpHeader('Content-type', 'image/jpeg'); $this->getResponse()->setContent(base64_decode($product->getImage()->getContents())); $this->getResponse()->sendHttpHeaders(); $this->getResponse()->sendContent(); return sfView :: NONE; }