mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
thumbnails: Add setting THUMBNAIL_IMAGES.
This setting splits away part of responsibility from THUMBOR_URL. Now on, this setting will be responsible for controlling whether we thumbnail images or not by asking bugdown to render image links to hit our /thumbnail endpoint. This is irrespective of what THUMBOR_URL is set to though ideally THUMBOR_URL should be set to point to a running thumbor instance.
This commit is contained in:
committed by
Tim Abbott
parent
9e9bd2456f
commit
3ee69f3da9
@@ -379,7 +379,7 @@ class BugdownTest(ZulipTestCase):
|
||||
|
||||
msg = 'https://www.google.com/images/srpr/logo4w.png'
|
||||
thumbnail_img = '<div class="message_inline_image"><a href="https://www.google.com/images/srpr/logo4w.png" target="_blank" title="https://www.google.com/images/srpr/logo4w.png"><img src="https://www.google.com/images/srpr/logo4w.png"></a></div>'
|
||||
with self.settings(THUMBOR_URL=''):
|
||||
with self.settings(THUMBNAIL_IMAGES=False):
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertIn(thumbnail_img, converted)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user