summaryrefslogtreecommitdiff
path: root/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'init.php')
-rw-r--r--init.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.php b/init.php
index 7c22089..64a37ad 100644
--- a/init.php
+++ b/init.php
@@ -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)) {