Twitter's images should be safe from attacks.
While it is technically possible for an attack to be embedded in an image, you're far more at risk with everyday email and web browsing. This would require some sort of very serious and extremely unlikely exploit in your system's image renderer.
You're a little safer with Twitter than arbitrary emails' images or images from other websites because Twitter reencodes most images that are uploaded to it, which means it'll coincidentally remove most non-image data (likely including an exploit's payload), plus I presume they also scan for malware. They'd almost certainly introduce such scanning after such an unlikely attack is documented.
The only even remotely-related item I can think of is this series of polyglot file proofs of concept like appending DEFLATE (.zip) data to a PNG image and keeping it compact enough to avoid Twitter's reencoding logic, but all of those require manually telling your software how to reinterpret the file.
I believe you'd have to go back a few decades to find any sort of exploit coming from an image.