summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c0f9162)
Assume any picture with such extension has a corresponding version preferred
as article thumbnail (cropped for smaller sizes).
function thumb($size = '300x')
{
if (!$this->image or $this->image[0] !== '/') return;
function thumb($size = '300x')
{
if (!$this->image or $this->image[0] !== '/') return;
- return preg_replace('{^(?:/thumb/[^/]*)?}', "thumb/$size", $this->image);
+ return preg_replace(
+ ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],
+ $this->image
+ );