I suspect the issue is that we add the topic image metadata in a background job, which runs a few seconds after a topic is created (depending on the load of your forum). If twitter fetches and caches the metadata before we’ve generated the metadata, then it will be caching the old information.
When you run it through their testing tool, it resets their cache, and so it starts working.
To work around it, could you add a delay to your bot? 1-2 minutes should be pretty safe.