I understand; I was thinking from your angle. Rendering and hosting images is a big effort, what if someone change the query string slightly and you would lose the caching opportunity?
With a static site generator I can make the og:image generation part of the build process and host the result myself. Less burden for you, more security for me.