I am using the Giphy API
and FLAnimatedImage
respository to fetch and show gifs. Is there a way to store selected gifs to firebase
or firestore
that I can then fetch later?
My reason is to avoid the intensive task of re-downloading the gif. Would it be storing the bytes of the Data
object?
I understand I could probably just store the gif url and then when I need the gif, to query the string and re-download, but I'm hoping to again avoid that if there's a way.
Any guidance would be appreciated.
let url = URL(string: gifUrlString)!
let imageData = try? Data(contentsOf: url)
let image = FLAnimatedImage(animatedGIFData: imageData)