Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/lazy_image_tag_helper.rb')
-rw-r--r--app/helpers/lazy_image_tag_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/lazy_image_tag_helper.rb b/app/helpers/lazy_image_tag_helper.rb
index 0c5744b46ae..d0bdaaae5f8 100644
--- a/app/helpers/lazy_image_tag_helper.rb
+++ b/app/helpers/lazy_image_tag_helper.rb
@@ -1,12 +1,15 @@
# frozen_string_literal: true
module LazyImageTagHelper
+ include PreferencesHelper
+
def placeholder_image
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
end
# Override the default ActionView `image_tag` helper to support lazy-loading
def image_tag(source, options = {})
+ source = options[:dark_variant] if options[:dark_variant] && user_application_dark_mode?
options = options.symbolize_keys
unless options.delete(:lazy) == false