mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
When uploading images, they are assigned a dominant color which gets used in various places, such as Discourse Hub and the new lightbox. Previously in chat we didn't assign this attribute, so it was defaulting to a null value. We did however use it as an inline CSS style for the image background (which is visible while the image is downloaded). This change adds data-dominant-color to the uploaded image in chat and uses it correctly within lightbox.