diff --git a/core/components/phpthumbon/model/phpthumbon/phpthumbon.class.php b/core/components/phpthumbon/model/phpthumbon/phpthumbon.class.php index 38fae91..27e217e 100644 --- a/core/components/phpthumbon/model/phpthumbon/phpthumbon.class.php +++ b/core/components/phpthumbon/model/phpthumbon/phpthumbon.class.php @@ -267,8 +267,7 @@ public function relativeSrcPath(){ $assets = ltrim($this->_config['assetsUrl'],'/'); $imgDir = $this->_config['imagesFolder']; - $this->_config['relativePath'] = preg_replace("#^({$full_assets}|(/)?{$assets})?#", '', $this->_pathinfo('dirname')); - $this->_config['relativePath'] = preg_replace("#^(/)?{$imgDir}(/)?#","",$this->_config['relativePath']); + $this->_config['relativePath'] = preg_replace("#^({$full_assets}|(/)?{$assets})(/)?{$imgDir}(/)?#", '', $this->_pathinfo('dirname')); }else{ if($this->_flag = file_exists($this->_config['noimage'])){ $this->_config['input'] = $this->_config['noimage'];