In this masterclass, we will review the basic concepts of image and video compression, comparing traditional and more recent approaches using deep learning, with special emphasis on the latter.