function thumb($size = '300x')
{
if (!$this->image or $this->image[0] !== '/') return;
+ if (preg_match('{^/thumb/\D}', $this->image)) {
+ return ltrim($this->image, '/');
+ }
return preg_replace(
['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],
$this->image