diff options
-rw-r--r-- | init.php | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -274,6 +274,9 @@ class Api_Resize_Media extends Plugin { private function rewrite_url_if_needed($url, $width, $force_stamp = false) { if (strpos($url, "data:") !== 0 && $width > 0) { + if ($width > self::MAX_WIDTH) + $width = self::MAX_WIDTH; + $local_filename = sha1($url) . "-$width"; if ($this->cache->exists($local_filename)) { |