This animation is bad because:

* It discontinuously changes the opacity from min to max and back. The opacity should change smoothly, i.e. it should transition from min to max going through all the values in between.
* It is too fast
* It's not visible after you mouseout while the image is still uploading

I suggest you use CSS transitions to achieve a better effect - use one class that indicates the element should be animating and add it to the element using jQuery when the animation should be played. When the animation should be over, just remove the class. This will also allow you to remove the complexity from `finishUploadAnimation` and `startUploadAnimation` and just have them add/remove a CSS class. The `animateImage` function can then be fully moved to a couple of CSS rules.