protected function compile()
 {
     if ($this->defineRoot) {
         $objPage = \PageModel::findByPk($this->rootPage);
     } else {
         global $objPage;
     }
     if (null === $objPage) {
         return;
     }
     $intOffset = (int) $this->levelOffset;
     // Random image
     if ($this->randomPageImage) {
         $intOffset = -1;
     }
     $arrImage = PageImage::getOne($objPage, $intOffset, (bool) $this->inheritPageImage);
     if (null === $arrImage) {
         return;
     }
     $arrSize = deserialize($this->imgSize);
     $arrImage['src'] = $this->getImage($arrImage['path'], $arrSize[0], $arrSize[1], $arrSize[2]);
     $this->Template->setData($arrImage);
     if (($imgSize = @getimagesize(TL_ROOT . '/' . rawurldecode($arrImage['src']))) !== false) {
         $this->Template->size = ' ' . $imgSize[3];
     }
 }