mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: Safely skip secure_media steps when it's not enabled (#11110)
* FIX: Safely skip secure_media steps when it's not enabled * DEV: Secure media tests should enable secure media
This commit is contained in:

committed by
GitHub

parent
d2116f0029
commit
b70b3e867c
@ -432,7 +432,7 @@ module PrettyText
|
||||
|
||||
# images by themselves or inside a onebox
|
||||
doc.css('img[src]').each do |img|
|
||||
url = if img.parent.classes.include?("aspect-image")
|
||||
url = if img.parent.classes.include?("aspect-image") && img.attributes["srcset"].present?
|
||||
|
||||
# we are using the first image from the srcset here so we get the
|
||||
# optimized image instead of the original, because an optimized
|
||||
|
Reference in New Issue
Block a user