Thanks everyone. I don’t actually use Auto Optimise (just W3TC) however will wait and see if it resolves itself in the next update.
I have the same problem. I use a different caching plugin (W3 Total Cache) and am able to solve it by disabling HTML minify but would prefer to keep that option enabled.
Is it possible to fix this within the plugin itself? I don’t notice the issue with any other images – just Pinterest.
Thanks!