First, select a source image. Monochrome photographs work best. The image shouldn't be too big, as we are going to end up with four frames that won't compress very well.
Duplicate the layer and select the new layer. Use the Free Transform tool to slightly enlarge and rotate the layer. The windows shortcut for Free Transform is ALT+t. Make sure you are enlarging and zooming around the centre of the image. To help with keeping it centred hold down SHIFT+ALT when you grab the control points of the Free Transform window. It's best to only make slight modifications to the original picture, ensuring that the change between frames is quite small. I usually enlarge by around 105% and rotate by around 2.5 degrees.
We now have two layers, the original layer and a slightly zoomed/rotated one. The next step is to duplicate both layers and invert the colours in the duplicates, so they are negatives. Use Image->Adjust->Invert or press CTR+I.
Now that we have our four frames. it's time to animate. The sequence is:
Frame times should be set to around 0.07ms.
And that's it. Lossy compression can help to get the file size down, and since the images are monochrome, you can usually get away with only 16 colours. This is how I make these animations, feel free to experiment and improve the process.
The effect is not limited to zooming/spinning, you can do linear movements as well (side to side, up and down etc)
I've found that grayscale images work best. Photographs seem to work better than cartoons or line art.