summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-17 13:40:35 +0300
committerAndrew Dolgov <[email protected]>2021-02-17 13:40:35 +0300
commit03f89dbedf622a6dc3eef68b33422d2729b73443 (patch)
tree79e12ba4520036a54fa984f83c02ebf7074de266
parent1c4199d75d804234342cd8d35b826d0d6703ee45 (diff)
don't try to resize to 0
-rw-r--r--init.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.php b/init.php
index 766a6d7..cc673b2 100644
--- a/init.php
+++ b/init.php
@@ -208,7 +208,7 @@ class Api_Resize_Media extends Plugin {
}
private function rewrite_url_if_needed($url, $width, $force_stamp = false) {
- if (strpos($url, "data:") !== 0) {
+ if (strpos($url, "data:") !== 0 && $width > 0) {
$local_filename = sha1($url) . "-$width";