Even though you call store
before doing the resize, there's no guarantee the code for the resize does not begin before the code for storing has finished, and since there's network latency involved and the docs for S3Object specifically say that larger files (of which image files could surely be classed) will get sent up in chunks, it's quite possible you're modifying a file that hasn't yet been sent.
Whatever the reason, the simple answer is to make a copy of the file and resize that.