about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/data/scope.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 0c003399..9d9d9500 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -132,9 +132,10 @@ handle_image() {
     local mimetype="${1}"
     case "${mimetype}" in
         ## SVG
-        # image/svg+xml|image/svg)
-        #     convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
-        #     exit 1;;
+        image/svg+xml|image/svg)
+            rsvg-convert --keep-aspect-ratio --width "${DEFAULT_SIZE%x*}" "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}.png" \
+                && mv "${IMAGE_CACHE_PATH}.png" "${IMAGE_CACHE_PATH}" \
+                && exit 6
 
         ## DjVu
         # image/vnd.djvu)