Improves initial page-load performance, and helps meet WCAG 2 level AA.
Initially load a static image (.jpg) then once the page has fully loaded, swap it out for the (much) larger animated gif.
A pause control is added which flips between the static image and the animation to meet WCAG 2 level AA. Which states a pause control is a requirement on animations which last longer than 5 seconds.
The animated gif is preloaded into memory then displayed preventing flashes of white occuring.
Sent for accessibility testing to the Digital Accessibility Centre . Tested as fully compliant 23/09/2016.
Code repo available on GitHub .