thumb: append .jpg extension to match file type
[minimedit.git] / article.inc.php
index f56b2bedd27439e40e001e2141fbbdf2e9d5ca80..9e920942c76b888bbf1da2cb5b8a8a0b06f70ceb 100644 (file)
@@ -165,8 +165,9 @@ class ArchiveArticle
                        return ltrim($this->image, '/');
                }
                return preg_replace(
-                       ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/'], ["thumb/$size", ''],
-                       $this->image
+                       ['{^(?:/thumb/[^/]*)?}', '/\.groot(?=\.\w+$)/', '/(?:\.jpg)?$/'],
+                       [      "thumb/$size",    '',                         '.jpg'    ],
+                       $this->image, 1
                );
        }