summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/settingobject.py1
-rw-r--r--ranger/core/actions.py4
-rw-r--r--ranger/gui/widgets/browsercolumn.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/ranger/container/settingobject.py b/ranger/container/settingobject.py
index 431d26e3..7d715f38 100644
--- a/ranger/container/settingobject.py
+++ b/ranger/container/settingobject.py
@@ -26,6 +26,7 @@ ALLOWED_SETTINGS = {
 	'mouse_enabled': bool,
 	'padding_right': bool,
 	'preview_directories': bool,
+	'preview_images': bool,
 	'preview_files': bool,
 	'preview_script': (str, type(None)),
 	'save_console_history': bool,
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 2300aa96..80db1aa5 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -777,7 +777,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 			return
 
 		pager = self.ui.open_embedded_pager()
-		if self.thisfile.is_image():
+		if self.settings.preview_images and self.thisfile.is_image():
 			pager.set_image(self.thisfile.realpath)
 		else:
 			pager.set_source(self.thisfile.get_preview_source(pager.wid, pager.hei))
@@ -796,7 +796,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		pager = self.ui.browser.pager
 		path = file.realpath
 
-		if file.is_image():
+		if self.settings.preview_images and file.is_image():
 			pager.set_image(path)
 			return None
 
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 94c71929..02c2a5f0 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -168,7 +168,7 @@ class BrowserColumn(Pager):
 			Pager.close(self)
 			return
 
-		if self.target.is_image():
+		if self.fm.settings.preview_images and self.target.is_image():
 			self.set_image(self.target.realpath)
 			Pager.draw(self)
 		else: