The topics are embedded as an iframe so using javascript is going to be very difficult. You’d have an easier time writing a plugin, or as you mentioned, calling the API directly to do what you want.
I would accept a pull request on core to add an option for smaller image sizes if you are comfortable with ruby.