Closed zhuowei closed 4 years ago
Thank you for reporting this. It seems that Twitter is serving PNG files with a ".gif" extension in some instances:
$ wget -nv -O - "https://pbs.twimg.com/profile_images/1811733200/fon_reasonably_small_400x400.gif" | head -c 4
�PNG
I never knew this. This fix will break if there are actual GIF files with a ".gif" extension, but my guess is that these don't exist on Twitter now. I'm going to do a quick trawl through recent tweets in the random public sample for profiles with .gif to confirm before merging.
Thank you!
Some old accounts use a GIF avatar, which can't be loaded into the model. Convert them to PNG during resizing.
Testing: Running m3webdemo on @TheFacesOfNotch, which uses a .gif avatar, previously causes an error; it works with this patch.
Running m3webdemo on other accounts (eg
@Xbox
,@AppleTV
) still works.