How to distort still image or gif animation
For this effect, you have to first install the Animation Nodes + Extra Nodes because we need UV Map Data Output node (learn more).

Idea: Distortion of image/movie coordinates in the material.

Step-1: Add image/movie as plane using Images as Planes option of the Blender. Then, setup the material like this in the image (please note that the Generated and UV coordinates are added together),


Step-2: Then subdivide the image (or movie) plane few times,


Step-3: I have created a 2D Noise group-node from two Vector Noise nodes which will use in the next step to set the UV coordinates for the plane,


Step-4: Now, compute the 2D Noise based on the vertices of the plane then use that noise as UV coordinates in the UV Map Data Output node and adjust the parameters of 2D Noise group-node based upon your requirement,


Step-5: Then you can also animate the z-value of Offset of 2D Noise group-node,
 

Final Node-Tree:


Blend File: