-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Gallery: Flash of white when image is uploaded #11650
Copy link
Copy link
Closed
Labels
[Block] GalleryAffects the Gallery Block - used to display groups of imagesAffects the Gallery Block - used to display groups of images[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Metadata
Metadata
Assignees
Labels
[Block] GalleryAffects the Gallery Block - used to display groups of imagesAffects the Gallery Block - used to display groups of images[Feature] MediaAnything that impacts the experience of managing mediaAnything that impacts the experience of managing media[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
After the Gallery block finishes uploading an image, it swaps the temporary
blob:image with the realhttp://image. This causes a flash of white on slow to medium connections while the new image loads.To Reproduce
Expected behavior
I'd expect the images to appear with some indication that they are loading (seperate issue: #8810), and then for the temporary image to be seamlessly replaced with the real image.
Actual behaviour
There is a flash of white while the temporary image is swapped out with the real image.
Screenshots

Additional context
We can do this by loading the real image using
new Image()before inserting it into the DOM.