diff --git a/app/assets/javascripts/discourse/app/mixins/composer-video-thumbnail-uppy.js b/app/assets/javascripts/discourse/app/mixins/composer-video-thumbnail-uppy.js index 9346dfff85e..d4f2f5c7834 100644 --- a/app/assets/javascripts/discourse/app/mixins/composer-video-thumbnail-uppy.js +++ b/app/assets/javascripts/discourse/app/mixins/composer-video-thumbnail-uppy.js @@ -18,6 +18,9 @@ export default Mixin.create(ExtendableUploader, UppyS3Multipart, { @bind _generateVideoThumbnail(videoFile, uploadUrl) { + if (!this.siteSettings.video_thumbnails_enabled) { + return; + } let video = document.createElement("video"); video.src = URL.createObjectURL(videoFile.data); diff --git a/config/site_settings.yml b/config/site_settings.yml index 53babda1a81..9eb084d08b7 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -1568,6 +1568,10 @@ files: default: false client: true hidden: true + video_thumbnails_enabled: + default: true + client: true + hidden: true trust: default_trust_level: