Page MenuHomePhabricator

Support animated GIFs
Closed, ResolvedPublic2 Estimated Story Points

Description

  • Support animated gifs in web view
  • Support animated gifs in native image gallery

Problem

SDWebImage API doesn't allow you to read (or write) image data directly from disk (as it's optimized for memory <- disk <- network fallbacks). This has led to us serializing images from the cache before returning to the WebView. Unfortunately, there's no built-in support for serializing GIFs from a UIImage.

Possible Solutions

  • Add a library to serialize GIFs from UIImage (e.g. https://github.com/mattt/AnimatedGIFImageSerialization)
  • Serve the unaltered data from the server to the UIWebView, using our own downloader combined with disk caching w/ the shared SDImageCache
  • Disable the article image protocol and see what happens?

Key Metrics

  • CPU
  • Disk
  • Memory
  • Network
  • First paint(?)

When presenting a page w/ many images and a warm/cold cache.


Related tickets: T95350

Event Timeline

BGerstle-WMF raised the priority of this task from to Needs Triage.
BGerstle-WMF updated the task description. (Show Details)
BGerstle-WMF subscribed.
Fjalapeno renamed this task from Fix broken GIFs in webview due to new image caching to Support GIFs in web view and in native image viewer.Jul 5 2015, 11:37 PM
Fjalapeno renamed this task from Support GIFs in web view and in native image viewer to Support animated GIFs.
Fjalapeno updated the task description. (Show Details)